結果
問題 |
No.822 Bitwise AND
|
ユーザー |
|
提出日時 | 2022-04-19 23:55:19 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 843 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 68,768 KB |
最終ジャッジ日時 | 2025-01-02 19:52:43 |
合計ジャッジ時間 | 2,573 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 5 |
ソースコード
N,K = map(int,input().split()) ans = 0 if N == 0 and K ==0: print(1) exit() if N == 0 and 0 < K: print('INF') exit() cnt = 0 for i in range(K+1): for j in range(i,K+1): x = i+N y = j+N if x & y == N: cnt += 1 if not (len(bin(x)) == len(bin(y))): print('INF') exit() print(cnt)