QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#125134 | #4964. Easy-to-Solve Expressions | Amys4n | AC ✓ | 1ms | 3540kb | C++14 | 297b | 2023-07-16 02:55:08 | 2023-07-16 02:55:11 |
Judging History
answer
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a+b == c or a+c==b or b+c ==a){
cout << 1 << endl;
} else if(a*b == c or a*c== b or b*c==a){
cout << 2 << endl;
} else{
cout << 3 << endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3540kb
input:
10 30 20
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3336kb
input:
10 20 200
output:
2
result:
ok single line: '2'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
100 5 700
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
100 200 300
output:
1
result:
ok single line: '1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
100 300 200
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3340kb
input:
300 200 100
output:
1
result:
ok single line: '1'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
100 200 299
output:
3
result:
ok single line: '3'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3316kb
input:
301 100 200
output:
3
result:
ok single line: '3'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
5 10 50
output:
2
result:
ok single line: '2'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
5 50 10
output:
2
result:
ok single line: '2'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
50 10 5
output:
2
result:
ok single line: '2'
Test #12:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
5 10 49
output:
3
result:
ok single line: '3'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
51 5 10
output:
3
result:
ok single line: '3'
Test #14:
score: 0
Accepted
time: 1ms
memory: 3316kb
input:
2 1000 3
output:
3
result:
ok single line: '3'