結果

問題 No.822 Bitwise AND
ユーザー titiatitia
提出日時 2019-04-26 22:39:32
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 76,388 KB
最終ジャッジ日時 2023-08-16 15:26:13
合計ジャッジ時間 4,000 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 231 ms
76,356 KB
testcase_01 AC 83 ms
76,072 KB
testcase_02 AC 76 ms
76,112 KB
testcase_03 AC 70 ms
71,188 KB
testcase_04 AC 156 ms
76,196 KB
testcase_05 AC 121 ms
75,984 KB
testcase_06 AC 160 ms
76,324 KB
testcase_07 AC 162 ms
75,876 KB
testcase_08 AC 239 ms
75,972 KB
testcase_09 AC 213 ms
75,976 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 232 ms
76,080 KB
testcase_13 AC 74 ms
76,184 KB
testcase_14 AC 69 ms
71,192 KB
testcase_15 AC 121 ms
76,128 KB
testcase_16 AC 78 ms
76,032 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,2*10**5+1):
    for i in range(K+1):
        if x & (x+i)==N:
            ANS+=1

print(ANS)

        
0