結果

問題 No.822 Bitwise AND
ユーザー lloyzlloyz
提出日時 2022-05-03 22:58:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 76,628 KB
最終ジャッジ日時 2023-09-15 19:26:16
合計ジャッジ時間 2,381 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,428 KB
testcase_02 AC 72 ms
71,484 KB
testcase_03 AC 72 ms
71,184 KB
testcase_04 AC 77 ms
76,268 KB
testcase_05 AC 74 ms
75,976 KB
testcase_06 AC 75 ms
76,060 KB
testcase_07 AC 76 ms
76,216 KB
testcase_08 AC 74 ms
76,228 KB
testcase_09 AC 74 ms
76,356 KB
testcase_10 AC 71 ms
71,260 KB
testcase_11 AC 70 ms
71,276 KB
testcase_12 AC 74 ms
76,488 KB
testcase_13 AC 70 ms
71,476 KB
testcase_14 AC 71 ms
71,372 KB
testcase_15 AC 73 ms
75,652 KB
testcase_16 AC 70 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

ans = 0
for i in range(n, n + k + 1):
    for j in range(i, i + k + 1):
        if i & j == n:
            ans += 1
print(ans)
0