結果
| 問題 | No.3150 count X which satisfies with equlation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-20 21:26:17 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 447 bytes |
| 記録 | |
| コンパイル時間 | 1,563 ms |
| コンパイル使用メモリ | 80,640 KB |
| 実行使用メモリ | 81,280 KB |
| 最終ジャッジ日時 | 2026-07-10 21:13:42 |
| 合計ジャッジ時間 | 5,435 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 WA * 32 |
ソースコード
import sys
input = lambda: sys.stdin.readline().rstrip()
def solve():
a, b = map(int, input().split())
ans = 1
ok = True
for i in range(0, 30):
if((a & (1 << i)) & (b & (1 << i))):
ans *= 2
if((a & (1 << i)) == 1 and (b & (1 << i)) == 0):
ok = False
if(ok):
print(ans)
else:
print(0)
t = 1
# t = int(input())
for _ in range(t):
solve()