結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-28 21:53:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-13 10:55:50 |
| 合計ジャッジ時間 | 2,192 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
a,b=map(int,input().split())
ct01,ct10=0,0
for i in range(31):
aa,bb=a&(1<<i),b&(1<<i)
if (not aa) and bb:
ct01+=1
if aa and (not bb):
ct10+=1
if ct10:
print(0)
else:
print(2**(max(0,ct01-1)))
takakin