結果

問題 No.822 Bitwise AND
ユーザー H3PO4H3PO4
提出日時 2021-02-14 11:01:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 76,720 KB
最終ジャッジ日時 2023-09-28 22:00:51
合計ジャッジ時間 3,506 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 174 ms
76,432 KB
testcase_01 AC 79 ms
71,372 KB
testcase_02 AC 73 ms
71,540 KB
testcase_03 AC 74 ms
71,324 KB
testcase_04 AC 175 ms
76,116 KB
testcase_05 AC 126 ms
76,328 KB
testcase_06 AC 160 ms
76,228 KB
testcase_07 AC 172 ms
76,464 KB
testcase_08 AC 80 ms
76,720 KB
testcase_09 AC 77 ms
76,560 KB
testcase_10 AC 74 ms
71,464 KB
testcase_11 AC 73 ms
71,288 KB
testcase_12 AC 79 ms
76,088 KB
testcase_13 AC 81 ms
76,336 KB
testcase_14 AC 76 ms
71,356 KB
testcase_15 AC 133 ms
76,324 KB
testcase_16 AC 74 ms
71,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
if N < K: print('INF');exit()

ans = 0
for x in range(2 ** N.bit_length()):
    for y in range(x, x + K + 1):
        if x & y == N:
            ans += 1
print(ans)
0