Right operation
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
In this task Your program should solve a puzzle in the form :
a ? b == c
In this puzzle a, b and c are nonnegative integers and are given as standard input (0<=a,b,c<=1e3), and Your task is to say, which operations satisfy the equation, so the equality holds.
At your disposal you have discussed already operations in C++:
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
% (modulo)
Your program should output a line with the solved puzzle, exchanging the ? symbol to the correct operation. the operation symbol and equality sign should be surrounded by single spaces.
We guarantee that for each puzzle there is at least one solution. If a puzzle has more than one solution, Your program should output ALL of them, in separate lines, in the order of equations described above.
Options
exec is denied
no deadline, the server will not save your submission
Sample input:_
0 0 0
Sample output:
0 + 0 == 0
0 - 0 == 0
0 * 0 == 0
Sample input:_
2 2 4
Sample output:
2 + 2 == 4
2 * 2 == 4
Sample input:_
4 2 2
Sample output:
4 - 2 == 2
4 / 2 == 2
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 64 | 0.0498 | 2024/05/03 18:08:16 | 0B / 26B / 31B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 64 | 0.1727 | 2024/05/03 18:08:01 | 0B / 26B / 31B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | fuzzylojik | 76 | 0.0958 | 2024/04/25 02:30:20 | 0B / 36B / 34B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | fuzzylojik | 68 | 0.1389 | 2024/04/26 02:02:02 | 0B / 33B / 32B |
2 | xnor | 68 | 0.2577 | 2024/04/27 12:14:27 | 0B / 29B / 36B |
3 | orthoplex | 71 | 0.1379 | 2024/04/25 02:05:32 | 0B / 34B / 33B |
4 | JunkIce | 102 | 0.1374 | 2024/09/28 00:29:00 | 0B / 54B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | voytxt | 77 | 0.0611 | 2024/04/27 15:06:36 | 0B / 30B / 45B |
2 | KrausRaus | 80 | 0.0584 | 2024/04/28 16:28:46 | 0B / 37B / 40B |
3 | fuzzylojik | 81 | 0.0590 | 2024/04/28 09:24:22 | 0B / 32B / 45B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | hbert | 139 | 0.0440 | 2024/04/25 03:04:48 | 0B / 68B / 61B |
2 | | 143 | 0.0436 | 2024/04/25 02:55:31 | 0B / 69B / 64B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Fleur | 49 | 0.0412 | 2024/05/24 15:44:44 | 0B / 11B / 34B |
2 | sean | 73 | 0.0413 | 2024/05/01 03:30:12 | 0B / 26B / 47B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 52 | 0.0417 | 2024/04/25 10:26:56 | 0B / 9B / 34B |
2 | McBusLuck | 52 | 0.0435 | 2024/04/26 21:32:08 | 0B / 10B / 33B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | McBusLuck | 59 | 0.0448 | 2024/04/28 16:56:35 | 0B / 21B / 28B |
2 | tails | 59 | 0.0436 | 2024/05/24 13:26:17 | 0B / 21B / 27B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | fuzzylojik | 108 | 0.0440 | 2024/05/01 04:14:53 | 0B / 40B / 35B |
2 | McBusLuck | 109 | 0.0432 | 2024/04/27 04:02:29 | 0B / 40B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Fleur | 999 | 0.0414 | 2024/04/25 15:46:16 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 89 | 9.3579 | 2024/05/01 23:30:39 | 0B / 37B / 48B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | AWK | Fleur | 49 | 10000 |
2 | sed | tails | 52 | 9423 |
3 | Bash (builtins) | McBusLuck | 59 | 8305 |
4 | Ruby2 | rotary-o | 64 | 7656 |
5 | Ruby | rotary-o | 64 | 7656 |
6 | Python3 | fuzzylojik | 68 | 7205 |
7 | Python | fuzzylojik | 76 | 6447 |
8 | JavaScript | voytxt | 77 | 6363 |
9 | Scala | rotary-o | 89 | 5505 |
10 | bc | fuzzylojik | 108 | 4537 |
11 | C++ | hbert | 139 | 3525 |
12 | dc | Fleur | 999 | 490 |
return to the top page