QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#125956#4964. Easy-to-Solve Expressions AH_Lusho#AC ✓1ms3524kbC++14267b2023-07-18 01:38:572023-07-18 01:38:59

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-18 01:38:59]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3524kb
  • [2023-07-18 01:38:57]
  • 提交

answer

#include <iostream>

using namespace std;

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(c+a == b or c+b == a or a+b ==c)
        cout<<1<<endl;
    else if(c*a == b or c*b == a or a*b ==c)
        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: 3324kb

input:

10 30 20

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3384kb

input:

10 20 200

output:

2

result:

ok single line: '2'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3284kb

input:

100 5 700

output:

3

result:

ok single line: '3'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

100 200 300

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

100 300 200

output:

1

result:

ok single line: '1'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3524kb

input:

300 200 100

output:

1

result:

ok single line: '1'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3360kb

input:

100 200 299

output:

3

result:

ok single line: '3'

Test #8:

score: 0
Accepted
time: 1ms
memory: 3476kb

input:

301 100 200

output:

3

result:

ok single line: '3'

Test #9:

score: 0
Accepted
time: 1ms
memory: 3340kb

input:

5 10 50

output:

2

result:

ok single line: '2'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

5 50 10

output:

2

result:

ok single line: '2'

Test #11:

score: 0
Accepted
time: 1ms
memory: 3344kb

input:

50 10 5

output:

2

result:

ok single line: '2'

Test #12:

score: 0
Accepted
time: 1ms
memory: 3392kb

input:

5 10 49

output:

3

result:

ok single line: '3'

Test #13:

score: 0
Accepted
time: 1ms
memory: 3360kb

input:

51 5 10

output:

3

result:

ok single line: '3'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3376kb

input:

2 1000 3

output:

3

result:

ok single line: '3'