結果

問題 No.822 Bitwise AND
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-11-04 10:29:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 76,632 KB
最終ジャッジ日時 2023-09-29 15:41:13
合計ジャッジ時間 2,641 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 58 ms
71,316 KB
testcase_02 AC 59 ms
71,220 KB
testcase_03 AC 57 ms
71,456 KB
testcase_04 AC 137 ms
76,308 KB
testcase_05 AC 91 ms
75,984 KB
testcase_06 AC 113 ms
76,440 KB
testcase_07 AC 137 ms
76,604 KB
testcase_08 WA -
testcase_09 AC 63 ms
76,344 KB
testcase_10 AC 57 ms
71,232 KB
testcase_11 AC 57 ms
71,408 KB
testcase_12 AC 65 ms
76,328 KB
testcase_13 AC 63 ms
76,288 KB
testcase_14 AC 60 ms
71,236 KB
testcase_15 AC 102 ms
76,360 KB
testcase_16 AC 61 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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