結果

問題 No.822 Bitwise AND
ユーザー ああいいああいい
提出日時 2022-01-27 14:59:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 76,388 KB
最終ジャッジ日時 2023-08-26 15:12:17
合計ジャッジ時間 3,578 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 62 ms
71,172 KB
testcase_02 WA -
testcase_03 AC 62 ms
71,200 KB
testcase_04 AC 158 ms
76,308 KB
testcase_05 AC 109 ms
76,252 KB
testcase_06 AC 143 ms
76,296 KB
testcase_07 AC 149 ms
76,308 KB
testcase_08 AC 70 ms
76,336 KB
testcase_09 WA -
testcase_10 AC 63 ms
71,384 KB
testcase_11 AC 63 ms
71,360 KB
testcase_12 AC 66 ms
76,388 KB
testcase_13 AC 66 ms
76,204 KB
testcase_14 AC 63 ms
71,120 KB
testcase_15 AC 117 ms
76,352 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+1):
    for y in range(x,x+K+1):
        if x & y == N:ans += 1
print(ans)
0