QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#139407#4966. Decimal XORartcsAC ✓1ms3560kbC++17602b2023-08-13 12:37:192023-08-13 12:37:19

Judging History

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

  • [2023-08-13 12:37:19]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3560kb
  • [2023-08-13 12:37:19]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s_1, s_2;
    cin>>s_1>>s_2;

    int t1  = s_1.size(), t2 = s_2.size();
    int tam = max(t1, t2);


    for (int i=0; i < (tam - t1) ; i++)
        s_1 = "0"+s_1;
    for (int i=0; i < (tam - t2) ; i++)
        s_2 = "0"+s_2;

      

    
    string res = "";
    for (int i=0; i< tam ;i++)
    {
        if( (s_1[i] <= '2' && s_2[i] <= '2') || (s_1[i] >= '7' && s_2[i] >= '7') )
            res += "0";
        else    
            res += "9";

    }

    cout<<res<<endl;


    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3548kb

input:

22776
15954

output:

09099

result:

ok single line: '09099'

Test #2:

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

input:

29
18908

output:

09900

result:

ok single line: '09900'

Test #3:

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

input:

18908
29

output:

09900

result:

ok single line: '09900'

Test #4:

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

input:

0
0

output:

0

result:

ok single line: '0'

Test #5:

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

input:

0
999999

output:

999999

result:

ok single line: '999999'

Test #6:

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

input:

999999
0

output:

999999

result:

ok single line: '999999'

Test #7:

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

input:

999999
999999

output:

000000

result:

ok single line: '000000'

Test #8:

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

input:

102102
111222

output:

000000

result:

ok single line: '000000'

Test #9:

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

input:

789789
777888

output:

000000

result:

ok single line: '000000'

Test #10:

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

input:

456456
555666

output:

999999

result:

ok single line: '999999'

Test #11:

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

input:

111
102345

output:

000999

result:

ok single line: '000999'

Test #12:

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

input:

200
6789

output:

9999

result:

ok single line: '9999'

Test #13:

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

input:

3456
1023

output:

9999

result:

ok single line: '9999'

Test #14:

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

input:

3456
4567

output:

9999

result:

ok single line: '9999'

Test #15:

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

input:

34
89

output:

99

result:

ok single line: '99'

Test #16:

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

input:

789789
102345

output:

999999

result:

ok single line: '999999'

Test #17:

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

input:

7897
6789

output:

9000

result:

ok single line: '9000'

Test #18:

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

input:

666666
55555

output:

999999

result:

ok single line: '999999'

Test #19:

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

input:

333
4444

output:

9999

result:

ok single line: '9999'

Test #20:

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

input:

22
1

output:

00

result:

ok single line: '00'