結果
問題 |
No.939 and or
|
ユーザー |
![]() |
提出日時 | 2019-12-02 00:57:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-22 00:50:18 |
合計ジャッジ時間 | 2,139 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 WA * 13 |
ソースコード
A,B = map(int,input().split()) if A>B or len(bin(A)) != len(bin(B)): print(0) exit() ans = 1 less = False for a,b in (zip(bin(A)[2:],bin(B)[2:])): if a==b: continue if less: ans *= 2 else: if a=='1' and b=='0': print(0) exit() less = True print(ans)