結果
問題 |
No.3249 AND
|
ユーザー |
![]() |
提出日時 | 2025-08-29 21:29:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 244 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,180 KB |
実行使用メモリ | 105,360 KB |
最終ジャッジ日時 | 2025-08-29 23:57:40 |
合計ジャッジ時間 | 3,501 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 WA * 2 |
ソースコード
N=int(input()) B=list(map(int,input().split())) ans = 0 for j in range(30): for i in range(N): if (B[i]>>j)&1==1: if ((i+1)>>j)&1==0: print(-1) exit() ans |= (1<<j) print(ans)