diff options
Diffstat (limited to 'prolog/problems/license_plates/checklicenseplate_3/en.py')
-rw-r--r-- | prolog/problems/license_plates/checklicenseplate_3/en.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/prolog/problems/license_plates/checklicenseplate_3/en.py b/prolog/problems/license_plates/checklicenseplate_3/en.py index 76270cd..927c261 100644 --- a/prolog/problems/license_plates/checklicenseplate_3/en.py +++ b/prolog/problems/license_plates/checklicenseplate_3/en.py @@ -6,13 +6,13 @@ slug = 'check if the numbers in a license plate form an equation' description = '''\ <p><code>checkLicensePlate(LP, E1, E2)</code>: the digits in the list <code>LP</code> can be combined into a valid equation <code>E1</code> = <code>E2</code>. <code>E1</code> and <code>E2</code> are arithmetic expressions, obtained from sublists of <code>Plate</code> by inserting arithmetic operators (<code>+</code>, <code>-</code>, <code>*</code> and <code>/</code>) between elements. An additional unary minus can be inserted before the leftmost number of <code>E1</code> and <code>E2</code>.</p> <pre> - ?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2). - E1 = 3, E2 = 21/7 ; - E1 = -3, E2 = -21/7 ; - E1 = 3*2, E2 = -1+7 ; - E1 = -3*2, E2 = 1-7 ; - E1 = 3*2+1, E2 = 7 ; - E1 = -3*2-1, E2 = -7. +?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2). + E1 = 3, E2 = 21/7 ; + E1 = -3, E2 = -21/7 ; + E1 = 3*2, E2 = -1+7 ; + E1 = -3*2, E2 = 1-7 ; + E1 = 3*2+1, E2 = 7 ; + E1 = -3*2-1, E2 = -7. </pre>''' hint = {} |