23 out of 5
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Is it possible to find an arithmetic expression consisting of five given numbers that will yield the value 23. For this problem you can use only three arithmetic expressions: +, -, *. Assume that all these operations have the same priority and executed sequentially from left to right.
Input
Each line contains five positive integers from 1 to 50. Input is terminated by a line containing five zero's and is not processed.
Output
For each test case print "Possible" (without quotes) if there exists an arithmetic expression as described above that yields 23. Otherwise print "Impossible".
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 32%