結果
問題 |
No.939 and or
|
ユーザー |
|
提出日時 | 2021-12-07 18:38:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 273 bytes |
コンパイル時間 | 109 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-07 21:06:36 |
合計ジャッジ時間 | 1,711 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
import sys A,B = list(map(int,input().split())) count = 0 for i in range(32): mask = 1 << i if A & mask and B & mask == 0: print(0) exit() if A & mask == 0 and B & mask: count += 1 if A == B: print(1) else: print(2 ** (count-1))