結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
syunsuke
|
| 提出日時 | 2020-09-02 22:49:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 324 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-11-21 23:54:29 |
| 合計ジャッジ時間 | 2,584 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 WA * 5 |
ソースコード
A,B=map(int,input().split())
AND=[]
OR =[]
for i in range(31):
AND.append(A//(2**(30-i)))
A%=(2**(30-i))
OR.append(B//(2**(30-i)))
B%=(2**(30-i))
#print(AND)
#print(OR)
cnt=0
for i in range(31):
if AND[i]>OR[i]:
print(0)
exit()
elif AND[i]<OR[i]:
cnt+=1
print(2**(cnt-1))
syunsuke