結果
| 問題 |
No.1876 Xor of Sum
|
| ユーザー |
nephrologist
|
| 提出日時 | 2022-03-24 12:49:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 82,308 KB |
| 実行使用メモリ | 118,300 KB |
| 最終ジャッジ日時 | 2024-10-12 20:30:06 |
| 合計ジャッジ時間 | 3,993 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | TLE * 1 -- * 26 |
ソースコード
import sys
input = sys.stdin.buffer.readline
n = int(input())
A = list(map(int, input().split()))
temp = 1
for a in A:
nx = temp << a
# print("temp", bin(temp), "nx", bin(nx))
temp ^= nx
ans = 0
keta = 1
while temp:
if temp % 2:
ans ^= keta
temp //= 2
keta += 1
print(ans)
nephrologist