結果
問題 |
No.1674 Introduction to XOR
|
ユーザー |
![]() |
提出日時 | 2023-12-27 01:41:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 534 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 82,860 KB |
実行使用メモリ | 60,804 KB |
最終ジャッジ日時 | 2024-09-27 15:20:35 |
合計ジャッジ時間 | 1,899 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 12 |
ソースコード
n = int(input()) a = list(map(int,input().split())) lis = [] ma = 0 for i in range(n): num = a[i] li = [] while num > 0: li.append(num%2) num //= 2 l = len(li) ma = max(ma,l) add = 73-l for j in range(add): li.append(0) lis.append(li) ans = 0 for i in range(ma+1): if i == ma: if ans != 0: break s = set() for j in range(n): s.add(lis[j][i]) if len(s) == 1: if s == {0}: ans += 2**i print(ans)