結果

問題 No.1674 Introduction to XOR
ユーザー ygd.
提出日時 2021-09-11 11:23:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 345 bytes
コンパイル時間 993 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 58,256 KB
最終ジャッジ日時 2024-06-22 19:00:58
合計ジャッジ時間 2,139 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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