結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2019-12-02 00:07:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 330 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 82,256 KB |
| 実行使用メモリ | 66,008 KB |
| 最終ジャッジ日時 | 2024-11-21 23:36:57 |
| 合計ジャッジ時間 | 2,451 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 12 RE * 1 |
ソースコード
a_raw, b_raw = map(int, input().split())
a = bin(a_raw)[2:]
b = bin(b_raw)[2:]
L = max(len(a), len(b))
a.zfill(L)
b.zfill(L)
ans = 1
for i in range(L):
if a[i] == '0' and b[i] == '1':
ans *= 2
elif a[i] == '1' and b[i] == '0':
print(0)
exit()
if ans == 1:
print(1)
else:
print(ans // 2)
tamato