結果

問題 No.822 Bitwise AND
ユーザー titiatitia
提出日時 2019-04-26 23:06:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 234 bytes
コンパイル時間 1,414 ms
コンパイル使用メモリ 86,256 KB
実行使用メモリ 76,568 KB
最終ジャッジ日時 2023-08-16 16:52:30
合計ジャッジ時間 11,513 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,027 ms
76,320 KB
testcase_01 AC 93 ms
76,284 KB
testcase_02 AC 64 ms
75,808 KB
testcase_03 AC 62 ms
71,196 KB
testcase_04 AC 716 ms
75,996 KB
testcase_05 AC 384 ms
76,288 KB
testcase_06 AC 636 ms
76,212 KB
testcase_07 AC 707 ms
76,324 KB
testcase_08 AC 785 ms
76,216 KB
testcase_09 AC 680 ms
76,220 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 770 ms
76,248 KB
testcase_13 AC 67 ms
75,764 KB
testcase_14 AC 62 ms
71,188 KB
testcase_15 AC 433 ms
76,212 KB
testcase_16 AC 86 ms
76,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N,K=map(int,input().split())

if N==0 and K!=0:
    print("INF")
    sys.exit()
    
ANS=0
for x in range(N,10**6):
    for i in range(K+1):
        if x & (x+i)==N:
            ANS+=1

print(ANS)
0