diff options
Diffstat (limited to 'prolog/problems/world_data/people_in_capitals_1')
-rw-r--r-- | prolog/problems/world_data/people_in_capitals_1/common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/prolog/problems/world_data/people_in_capitals_1/common.py b/prolog/problems/world_data/people_in_capitals_1/common.py index b38a96f..cda2e06 100644 --- a/prolog/problems/world_data/people_in_capitals_1/common.py +++ b/prolog/problems/world_data/people_in_capitals_1/common.py @@ -13,17 +13,17 @@ facts = 'mondial' solution = '''\ people_in_capitals(N) :- findall(Pop, - (country(_,_,Capital,_,_,_), - city(Capital,_,_,Pop,_,_,_), + (country(_,ID,Capital,_,_,_), + city(Capital,ID,_,Pop,_,_,_), number(Pop)), L), - sum(L, N). + sum_list(L, N). ''' hint_type = { } test_cases = [ - ('people_in_capitals(N)', [{'N': '316277426'}]), + ('people_in_capitals(N)', [{'N': '313163317'}]), # old solution without equal IDs [{'N': '316277426'}] ] def test(code, aux_code): |