結果

問題 No.1674 Introduction to XOR
ユーザー gr1msl3ygr1msl3y
提出日時 2021-09-10 21:30:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 1,000 ms
コード長 206 bytes
コンパイル時間 1,080 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 71,448 KB
最終ジャッジ日時 2023-09-02 16:03:33
合計ジャッジ時間 3,663 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,436 KB
testcase_01 AC 74 ms
71,132 KB
testcase_02 AC 75 ms
71,436 KB
testcase_03 AC 73 ms
71,280 KB
testcase_04 AC 73 ms
70,932 KB
testcase_05 AC 74 ms
71,220 KB
testcase_06 AC 76 ms
71,020 KB
testcase_07 AC 77 ms
70,936 KB
testcase_08 AC 77 ms
71,404 KB
testcase_09 AC 77 ms
71,304 KB
testcase_10 AC 77 ms
71,276 KB
testcase_11 AC 76 ms
71,248 KB
testcase_12 AC 76 ms
71,168 KB
testcase_13 AC 75 ms
71,300 KB
testcase_14 AC 75 ms
71,104 KB
testcase_15 AC 76 ms
71,448 KB
testcase_16 AC 75 ms
70,936 KB
testcase_17 AC 76 ms
71,160 KB
testcase_18 AC 76 ms
71,280 KB
testcase_19 AC 75 ms
71,216 KB
testcase_20 AC 75 ms
71,380 KB
testcase_21 AC 77 ms
71,336 KB
testcase_22 AC 76 ms
71,240 KB
testcase_23 AC 78 ms
71,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
v = 0
for a in A:
    v |= a

n = v.bit_length()
for i in range(n):
    if not (v >> i) & 1:
        print(1 << i)
        break
else:
    print(1 << n)
0