結果

問題 No.1674 Introduction to XOR
ユーザー playerplayer
提出日時 2023-12-27 01:49:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 547 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 60,156 KB
最終ジャッジ日時 2023-12-27 01:49:59
合計ジャッジ時間 2,131 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 AC 36 ms
53,460 KB
testcase_05 AC 36 ms
53,460 KB
testcase_06 AC 36 ms
53,460 KB
testcase_07 AC 36 ms
53,460 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
testcase_10 AC 36 ms
53,460 KB
testcase_11 AC 36 ms
53,460 KB
testcase_12 AC 36 ms
53,460 KB
testcase_13 AC 37 ms
53,460 KB
testcase_14 AC 42 ms
60,156 KB
testcase_15 AC 42 ms
59,896 KB
testcase_16 AC 40 ms
53,460 KB
testcase_17 AC 42 ms
59,888 KB
testcase_18 AC 42 ms
59,896 KB
testcase_19 AC 42 ms
59,896 KB
testcase_20 AC 45 ms
60,152 KB
testcase_21 AC 40 ms
53,460 KB
testcase_22 AC 46 ms
59,888 KB
testcase_23 AC 43 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
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)
            
0