結果

問題 No.822 Bitwise AND
ユーザー ttrttr
提出日時 2020-02-27 21:28:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 64,896 KB
最終ジャッジ日時 2024-04-21 17:04:32
合計ジャッジ時間 2,122 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 44 ms
58,368 KB
testcase_02 AC 41 ms
57,984 KB
testcase_03 AC 37 ms
51,328 KB
testcase_04 AC 121 ms
64,896 KB
testcase_05 AC 73 ms
63,232 KB
testcase_06 AC 95 ms
63,104 KB
testcase_07 AC 118 ms
64,512 KB
testcase_08 AC 45 ms
59,392 KB
testcase_09 AC 44 ms
59,392 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 44 ms
59,264 KB
testcase_13 AC 42 ms
58,880 KB
testcase_14 AC 36 ms
51,968 KB
testcase_15 AC 83 ms
64,128 KB
testcase_16 AC 41 ms
58,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int, input().split())

if N == 0 and K > 0:
    print("INF")
else:
    ans = 0
    for x in range(N+2000):
        for y in range(x, x+K+1):
            if x&y == N:
                ans += 1

    print(ans)
0