QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#298377#6245. نورانmahdimalverdiAC ✓333ms66432kbJava11541b2024-01-06 04:45:432024-01-06 04:45:44

Judging History

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

  • [2024-01-06 04:45:44]
  • 评测
  • 测评结果:AC
  • 用时:333ms
  • 内存:66432kb
  • [2024-01-06 04:45:43]
  • 提交

answer

import java.util.Scanner;

class Codechef {
    public static void main(String[] args) throws java.lang.Exception {
        Scanner sc = new Scanner(System.in);

        int t = sc.nextInt();

        sc.nextLine();
        String a = sc.nextLine();
        String b = sc.nextLine();

        int counter = 0;
        for (int i = 0; i < t; i++) {
            if (a.charAt(i) != b.charAt(i)) {
                counter++;
            }
        }
        System.out.println(counter % 2 == 0 ? counter / 2 : "NO");
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 93ms
memory: 53340kb

input:

5
00011
11011

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 91ms
memory: 57056kb

input:

7
0101010
1101100

output:

NO

result:

ok single line: 'NO'

Test #3:

score: 0
Accepted
time: 333ms
memory: 66432kb

input:

344014
01000100100000000000010000010011011100111100000101001101000000110000101100011010011001011100101111000101101010111101001010111000011000001011011101011100110010001101000110110001111011001001010001001100011000100001110001000111111111011101111111000011011000010110101100111101111110010001000010110...

output:

86254

result:

ok single line: '86254'

Test #4:

score: 0
Accepted
time: 208ms
memory: 56600kb

input:

84004
110101100011001100100100110110110101000111110110010011101010000111011011101100100100101110010001100010111100011111011100101101110010111110110000101000111000000101011001110001100111110011010111011000110110110011001101010100100100011101010100101000011001110111110000010010101000010110101011111010...

output:

20970

result:

ok single line: '20970'

Test #5:

score: 0
Accepted
time: 87ms
memory: 53412kb

input:

400
10100100110110111111101100001001100010011111110100111111110111000111101011000011101010111110111011010011011011111100110000100010101001111100110110111110011011000000110001010110000111100010010111110111000011000011011001011101011010001100010100111011010000001111010111110000000000101000011101011011...

output:

NO

result:

ok single line: 'NO'

Test #6:

score: 0
Accepted
time: 100ms
memory: 54336kb

input:

111
010110101111001100010011010010101011000110100110110100110001011100000110000000011100000010101110111100010010010
110101000010000011011000100011000101000010111001000001010001001101100000100000011111101101011100010100111110000

output:

27

result:

ok single line: '27'

Test #7:

score: 0
Accepted
time: 89ms
memory: 57004kb

input:

292
1111000110010100101010110111111001010111010110110110111001011011011000010100100111000000110100100111101110100010100001011111100010110110101110110111000110011011100100111000010110011001011101101101101010000110111001000011100000100110010100001010010010001000100011100100000100010101100001000011
011...

output:

NO

result:

ok single line: 'NO'

Test #8:

score: 0
Accepted
time: 87ms
memory: 55460kb

input:

16
0110101110101100
0100110100000110

output:

NO

result:

ok single line: 'NO'

Test #9:

score: 0
Accepted
time: 97ms
memory: 57316kb

input:

158
11101111010111101111011101111000010001011100011100101100100101010110001100110011000100101101101100010011111010000001101011101110110000000011110100011010111101
00000001101101111001000101111111100000001001110001110110101110111100001101111011000000001010100101111001100000000111101111010100011100011...

output:

38

result:

ok single line: '38'

Test #10:

score: 0
Accepted
time: 92ms
memory: 53072kb

input:

18
111000111011010001
010101110101011010

output:

5

result:

ok single line: '5'