結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 201 ms
76,224 KB
testcase_01 AC 71 ms
70,944 KB
testcase_02 WA -
testcase_03 AC 71 ms
71,348 KB
testcase_04 AC 263 ms
76,408 KB
testcase_05 AC 150 ms
76,044 KB
testcase_06 AC 207 ms
75,928 KB
testcase_07 AC 264 ms
76,412 KB
testcase_08 AC 79 ms
76,316 KB
testcase_09 AC 78 ms
76,128 KB
testcase_10 AC 71 ms
71,168 KB
testcase_11 AC 71 ms
71,300 KB
testcase_12 AC 80 ms
76,156 KB
testcase_13 AC 76 ms
75,984 KB
testcase_14 AC 70 ms
71,100 KB
testcase_15 AC 177 ms
76,372 KB
testcase_16 AC 72 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

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