結果

問題 No.822 Bitwise AND
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-11-04 10:30:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 878 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 76,956 KB
最終ジャッジ日時 2023-09-08 01:18:02
合計ジャッジ時間 6,458 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 585 ms
76,832 KB
testcase_01 AC 69 ms
71,576 KB
testcase_02 AC 69 ms
71,444 KB
testcase_03 AC 69 ms
71,312 KB
testcase_04 AC 878 ms
76,956 KB
testcase_05 AC 386 ms
76,868 KB
testcase_06 AC 630 ms
76,832 KB
testcase_07 AC 874 ms
76,956 KB
testcase_08 AC 81 ms
76,064 KB
testcase_09 AC 80 ms
76,376 KB
testcase_10 AC 69 ms
71,312 KB
testcase_11 AC 70 ms
71,224 KB
testcase_12 AC 86 ms
76,348 KB
testcase_13 AC 78 ms
76,008 KB
testcase_14 AC 70 ms
71,224 KB
testcase_15 AC 508 ms
76,788 KB
testcase_16 AC 69 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
if n < k:
    print("INF")
else:
    ans = 0
    for i in range(n * 10 + 1):
        for j in range(k + 1):
            if i & (i + j) == n:
                ans += 1
    print(ans)
0