結果

問題 No.822 Bitwise AND
ユーザー ああいいああいい
提出日時 2022-01-27 15:00:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 76,640 KB
最終ジャッジ日時 2023-08-26 15:14:06
合計ジャッジ時間 2,755 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 65 ms
71,220 KB
testcase_02 AC 64 ms
71,064 KB
testcase_03 AC 64 ms
71,280 KB
testcase_04 AC 158 ms
76,276 KB
testcase_05 AC 114 ms
76,396 KB
testcase_06 AC 145 ms
76,480 KB
testcase_07 AC 159 ms
76,640 KB
testcase_08 AC 69 ms
76,632 KB
testcase_09 AC 68 ms
76,424 KB
testcase_10 AC 64 ms
71,276 KB
testcase_11 AC 65 ms
71,200 KB
testcase_12 AC 70 ms
76,304 KB
testcase_13 AC 70 ms
76,272 KB
testcase_14 AC 62 ms
71,324 KB
testcase_15 AC 115 ms
76,232 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
import sys
if N < K:
    print('INF')
    exit()
n = 1
while n < N:
    n <<= 1
ans = 0
for x in range(n):
    for y in range(x,x+K+1):
        if x & y == N:ans += 1
print(ans)
0