結果
問題 | No.822 Bitwise AND |
ユーザー |
|
提出日時 | 2019-11-05 21:08:43 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 519 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 89,216 KB |
最終ジャッジ日時 | 2024-09-15 00:12:54 |
合計ジャッジ時間 | 6,632 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 16 |
ソースコード
N, K = map(int, input().split()) if N == 0: if K == 0: print(1) else: print("INF") else: ans = 0 for y in range(N * K): if (y & N) != N: continue for x in range(max(0, y - K), y + 1)[:: -1]: if (y & x) == N: ans += 1 print(ans)