結果

問題 No.822 Bitwise AND
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-26 17:18:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 76,728 KB
最終ジャッジ日時 2023-08-24 22:51:20
合計ジャッジ時間 3,728 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 206 ms
76,164 KB
testcase_01 AC 75 ms
71,276 KB
testcase_02 AC 76 ms
71,380 KB
testcase_03 AC 75 ms
71,328 KB
testcase_04 AC 270 ms
76,708 KB
testcase_05 AC 155 ms
76,416 KB
testcase_06 AC 208 ms
76,156 KB
testcase_07 AC 266 ms
76,532 KB
testcase_08 AC 81 ms
76,416 KB
testcase_09 AC 80 ms
76,376 KB
testcase_10 AC 73 ms
71,160 KB
testcase_11 AC 72 ms
71,288 KB
testcase_12 AC 81 ms
76,412 KB
testcase_13 AC 78 ms
76,200 KB
testcase_14 AC 75 ms
71,276 KB
testcase_15 AC 178 ms
76,728 KB
testcase_16 AC 71 ms
71,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())

if n < k:
    print('INF')
    exit()

ans = 0
for x in range(2*n+1):
    for z in range(k+1):
        y = x+z
        if x&y == n:
            ans += 1
print(ans)
0