結果
| 問題 |
No.1674 Introduction to XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-11 00:43:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 1,000 ms |
| コード長 | 346 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 82,460 KB |
| 実行使用メモリ | 54,044 KB |
| 最終ジャッジ日時 | 2024-06-12 20:43:22 |
| 合計ジャッジ時間 | 1,848 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
from sys import stdin
def main(inp, inps):
N = int(inp())
A = list(map(int, inp().split()))
sum_A = 0
for a in A:
sum_A |= a
ans = sum_A + 1
for i, b in enumerate(map(int, (bin(sum_A)[2:])[::-1])):
if not b:
ans = 2**i
break
print(ans)
main(stdin.readline, stdin.readlines)