結果

問題 No.1674 Introduction to XOR
ユーザー playerplayer
提出日時 2023-12-27 01:41:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 534 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 60,152 KB
最終ジャッジ日時 2023-12-27 01:42:00
合計ジャッジ時間 1,975 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 42 ms
60,152 KB
testcase_15 AC 42 ms
59,896 KB
testcase_16 WA -
testcase_17 AC 42 ms
59,896 KB
testcase_18 AC 41 ms
59,896 KB
testcase_19 AC 45 ms
59,896 KB
testcase_20 AC 43 ms
60,144 KB
testcase_21 AC 37 ms
53,460 KB
testcase_22 AC 41 ms
59,888 KB
testcase_23 AC 42 ms
59,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0