結果

問題 No.822 Bitwise AND
ユーザー titiatitia
提出日時 2019-04-26 22:35:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 76,236 KB
最終ジャッジ日時 2023-08-16 15:24:03
合計ジャッジ時間 3,013 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 150 ms
75,964 KB
testcase_01 AC 69 ms
70,668 KB
testcase_02 AC 69 ms
70,864 KB
testcase_03 AC 69 ms
70,792 KB
testcase_04 AC 157 ms
75,876 KB
testcase_05 AC 107 ms
76,128 KB
testcase_06 AC 131 ms
76,080 KB
testcase_07 AC 158 ms
76,224 KB
testcase_08 AC 75 ms
76,208 KB
testcase_09 AC 75 ms
76,220 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 77 ms
76,236 KB
testcase_13 AC 74 ms
76,056 KB
testcase_14 AC 70 ms
71,196 KB
testcase_15 AC 118 ms
75,844 KB
testcase_16 AC 70 ms
70,968 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*N+1):
    for i in range(K+1):
        if x & (x+i)==N:
            ANS+=1

print(ANS)
0