QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#125134#4964. Easy-to-Solve Expressions Amys4nAC ✓1ms3540kbC++14297b2023-07-16 02:55:082023-07-16 02:55:11

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-16 02:55:11]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3540kb
  • [2023-07-16 02:55:08]
  • 提交

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'