QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#139404 | #4964. Easy-to-Solve Expressions | artcs | AC ✓ | 1ms | 3560kb | C++17 | 304b | 2023-08-13 12:35:18 | 2023-08-13 12:35:18 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
string s = "3";
if ( a + b == c || a+c == b || b + c == a)
s = "1";
if ( a * b == c || a*c == b || b * c == a)
s = "2";
cout<<s<<endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3560kb
input:
10 30 20
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
10 20 200
output:
2
result:
ok single line: '2'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
100 5 700
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3476kb
input:
100 200 300
output:
1
result:
ok single line: '1'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3436kb
input:
100 300 200
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
300 200 100
output:
1
result:
ok single line: '1'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3500kb
input:
100 200 299
output:
3
result:
ok single line: '3'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
301 100 200
output:
3
result:
ok single line: '3'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
5 10 50
output:
2
result:
ok single line: '2'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3472kb
input:
5 50 10
output:
2
result:
ok single line: '2'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3440kb
input:
50 10 5
output:
2
result:
ok single line: '2'
Test #12:
score: 0
Accepted
time: 1ms
memory: 3376kb
input:
5 10 49
output:
3
result:
ok single line: '3'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
51 5 10
output:
3
result:
ok single line: '3'
Test #14:
score: 0
Accepted
time: 1ms
memory: 3380kb
input:
2 1000 3
output:
3
result:
ok single line: '3'