結果

問題 No.822 Bitwise AND
ユーザー ttrttr
提出日時 2020-02-27 21:24:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,788 KB
実行使用メモリ 65,492 KB
最終ジャッジ日時 2024-04-21 17:03:58
合計ジャッジ時間 1,990 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 33 ms
52,168 KB
testcase_02 AC 32 ms
52,512 KB
testcase_03 AC 33 ms
52,460 KB
testcase_04 AC 105 ms
65,492 KB
testcase_05 AC 66 ms
64,460 KB
testcase_06 AC 88 ms
63,864 KB
testcase_07 AC 108 ms
65,240 KB
testcase_08 AC 40 ms
61,124 KB
testcase_09 AC 39 ms
60,008 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 40 ms
60,676 KB
testcase_13 AC 38 ms
59,668 KB
testcase_14 AC 34 ms
53,028 KB
testcase_15 AC 75 ms
64,160 KB
testcase_16 AC 33 ms
52,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

    print(ans)
0