結果

問題 No.1674 Introduction to XOR
ユーザー hydru
提出日時 2021-09-10 22:13:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 125 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-06-12 00:35:28
合計ジャッジ時間 2,000 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=list(map(int,input().split()))
q=0
for i in range(n):
    q|=A[i]
ans=(q^(q+1))
ans+=1
ans=ans>>1
print(ans)
0