結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 63 ms
71,268 KB
testcase_02 AC 62 ms
71,308 KB
testcase_03 AC 62 ms
71,388 KB
testcase_04 AC 159 ms
76,392 KB
testcase_05 AC 109 ms
76,280 KB
testcase_06 AC 142 ms
76,608 KB
testcase_07 AC 153 ms
76,400 KB
testcase_08 AC 69 ms
76,320 KB
testcase_09 AC 67 ms
75,884 KB
testcase_10 AC 62 ms
71,248 KB
testcase_11 AC 61 ms
71,192 KB
testcase_12 AC 67 ms
76,216 KB
testcase_13 AC 71 ms
76,548 KB
testcase_14 AC 63 ms
71,336 KB
testcase_15 AC 117 ms
76,268 KB
testcase_16 AC 65 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

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+1):
    for y in range(x,x+K+1):
        if x & y == N:ans += 1
print(ans)
0