結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
player
|
| 提出日時 | 2023-12-27 01:49:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 1,000 ms |
| コード長 | 547 bytes |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 60,772 KB |
| 最終ジャッジ日時 | 2024-09-27 15:20:40 |
| 合計ジャッジ時間 | 2,113 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
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
flg = False
for i in range(ma+1):
if flg:
break
s = set()
for j in range(n):
s.add(lis[j][i])
if len(s) == 1:
if s == {0}:
ans += 2**i
flg = True
print(ans)
player