結果
問題 |
No.1876 Xor of Sum
|
ユーザー |
![]() |
提出日時 | 2022-03-24 12:54:54 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 82,344 KB |
実行使用メモリ | 122,008 KB |
最終ジャッジ日時 | 2024-10-12 20:41:04 |
合計ジャッジ時間 | 3,951 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
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 = 0 while temp: if temp % 2: ans ^= keta temp //= 2 keta += 1 print(ans)