結果

問題 No.1674 Introduction to XOR
ユーザー ygd.ygd.
提出日時 2021-09-11 11:23:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 345 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 74,972 KB
最終ジャッジ日時 2023-09-04 21:31:44
合計ジャッジ時間 3,741 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
70,844 KB
testcase_01 AC 76 ms
70,812 KB
testcase_02 AC 77 ms
70,940 KB
testcase_03 AC 76 ms
70,760 KB
testcase_04 AC 74 ms
70,596 KB
testcase_05 AC 73 ms
70,932 KB
testcase_06 AC 75 ms
70,600 KB
testcase_07 AC 74 ms
70,736 KB
testcase_08 AC 76 ms
71,112 KB
testcase_09 AC 75 ms
71,152 KB
testcase_10 AC 76 ms
70,592 KB
testcase_11 AC 74 ms
70,840 KB
testcase_12 AC 74 ms
70,928 KB
testcase_13 AC 77 ms
70,728 KB
testcase_14 AC 74 ms
70,944 KB
testcase_15 AC 74 ms
70,852 KB
testcase_16 AC 77 ms
71,100 KB
testcase_17 AC 76 ms
70,732 KB
testcase_18 AC 76 ms
70,936 KB
testcase_19 AC 75 ms
70,588 KB
testcase_20 AC 76 ms
70,732 KB
testcase_21 AC 76 ms
71,000 KB
testcase_22 AC 76 ms
71,004 KB
testcase_23 AC 81 ms
74,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    MAX = 70
    ans = 0
    for j in range(MAX):
        for i in range(N):
            if (A[i]>>j)&1 == 1: break
        else:
            ans += 1<<j
            break
    print(ans)
        

if __name__ == '__main__':
    main()
0