結果

問題 No.822 Bitwise AND
ユーザー ttrttr
提出日時 2020-02-27 21:31:50
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 206 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 76,504 KB
最終ジャッジ日時 2023-09-08 01:14:42
合計ジャッジ時間 2,779 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 67 ms
71,056 KB
testcase_02 AC 66 ms
71,196 KB
testcase_03 AC 67 ms
71,412 KB
testcase_04 AC 145 ms
76,288 KB
testcase_05 AC 102 ms
75,924 KB
testcase_06 AC 125 ms
76,272 KB
testcase_07 AC 143 ms
76,444 KB
testcase_08 AC 81 ms
76,472 KB
testcase_09 AC 75 ms
76,292 KB
testcase_10 AC 68 ms
70,892 KB
testcase_11 AC 65 ms
71,444 KB
testcase_12 AC 76 ms
76,316 KB
testcase_13 AC 71 ms
75,972 KB
testcase_14 AC 68 ms
71,212 KB
testcase_15 AC 114 ms
76,412 KB
testcase_16 AC 67 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if N < K:
    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