結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 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 40 ms
59,772 KB
testcase_15 AC 41 ms
59,772 KB
testcase_16 WA -
testcase_17 AC 40 ms
59,772 KB
testcase_18 AC 41 ms
59,772 KB
testcase_19 AC 41 ms
59,772 KB
testcase_20 AC 40 ms
59,772 KB
testcase_21 AC 37 ms
53,460 KB
testcase_22 AC 40 ms
59,768 KB
testcase_23 AC 42 ms
59,772 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
# print(lis)
for i in range(ma+1):
    if i == ma:
        if ans != 0:
            break
    flg = True
    for j in range(n):
        if lis[j][i] == 1:
            flg = False
            break
        
    if flg:
        ans += 2**i
    
        
print(ans)
0