QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#88770#4810. Add OnechimeraWA 16ms8160kbPython3290b2023-03-17 09:18:162023-03-17 09:18:20

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-17 09:18:20]
  • 评测
  • 测评结果:WA
  • 用时:16ms
  • 内存:8160kb
  • [2023-03-17 09:18:16]
  • 提交

answer

N = int(input())
A = list(map(int,input().split()))

cb = [0]*61

for i in range(60):
    for a in A:
        if a & (1 << i):
            cb[i] += 1

j = 0
while cb[j]:
    cb[j] += 1
    j += 1

cb[j] += 1

print(sum((1 << j) if (cb[j]%2) else 0 for j in range(len(cb))))

详细

Test #1:

score: 100
Accepted
time: 12ms
memory: 8020kb

input:

4
1 2 1 2

output:

7

result:

ok 1 number(s): "7"

Test #2:

score: 0
Accepted
time: 8ms
memory: 8076kb

input:

5
1 2 3 4 5

output:

14

result:

ok 1 number(s): "14"

Test #3:

score: 0
Accepted
time: 11ms
memory: 8024kb

input:

6
1 2 4 7 15 31

output:

47

result:

ok 1 number(s): "47"

Test #4:

score: 0
Accepted
time: 8ms
memory: 8044kb

input:

5
41 40 50 11 36

output:

99

result:

ok 1 number(s): "99"

Test #5:

score: 0
Accepted
time: 2ms
memory: 8044kb

input:

6
10 40 60 2 44 47

output:

96

result:

ok 1 number(s): "96"

Test #6:

score: 0
Accepted
time: 16ms
memory: 8080kb

input:

6
46 25 39 47 23 60

output:

107

result:

ok 1 number(s): "107"

Test #7:

score: -100
Wrong Answer
time: 8ms
memory: 8160kb

input:

6
56 90 61 63 56 23

output:

176

result:

wrong answer 1st numbers differ - expected: '112', found: '176'