結果

問題 No.1869 Doubling?
ユーザー prussian_coderprussian_coder
提出日時 2022-03-19 14:10:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 177,200 KB
最終ジャッジ日時 2024-04-15 03:23:01
合計ジャッジ時間 3,474 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,952 KB
testcase_01 AC 35 ms
52,468 KB
testcase_02 AC 35 ms
52,888 KB
testcase_03 AC 45 ms
88,236 KB
testcase_04 AC 59 ms
147,076 KB
testcase_05 AC 62 ms
150,248 KB
testcase_06 AC 35 ms
52,128 KB
testcase_07 AC 34 ms
52,828 KB
testcase_08 AC 35 ms
52,860 KB
testcase_09 AC 36 ms
52,228 KB
testcase_10 AC 34 ms
53,312 KB
testcase_11 WA -
testcase_12 AC 35 ms
53,028 KB
testcase_13 WA -
testcase_14 AC 34 ms
53,084 KB
testcase_15 AC 36 ms
52,824 KB
testcase_16 AC 34 ms
51,820 KB
testcase_17 AC 34 ms
51,820 KB
testcase_18 AC 34 ms
52,028 KB
testcase_19 AC 33 ms
52,240 KB
testcase_20 AC 34 ms
52,208 KB
testcase_21 AC 33 ms
52,032 KB
testcase_22 AC 34 ms
53,100 KB
testcase_23 AC 33 ms
52,836 KB
testcase_24 AC 68 ms
176,564 KB
testcase_25 AC 67 ms
176,944 KB
testcase_26 AC 68 ms
176,972 KB
testcase_27 AC 68 ms
176,920 KB
testcase_28 AC 70 ms
176,240 KB
testcase_29 AC 69 ms
177,200 KB
testcase_30 AC 71 ms
176,032 KB
testcase_31 AC 69 ms
176,356 KB
testcase_32 AC 68 ms
175,976 KB
testcase_33 AC 36 ms
52,148 KB
testcase_34 AC 35 ms
53,244 KB
testcase_35 AC 35 ms
52,140 KB
testcase_36 AC 35 ms
52,740 KB
testcase_37 AC 34 ms
52,488 KB
testcase_38 AC 34 ms
52,436 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 69 ms
176,284 KB
testcase_43 AC 67 ms
175,904 KB
testcase_44 AC 34 ms
52,316 KB
testcase_45 AC 34 ms
52,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
ans=0
P=0
X=K
if 2**N<=K:
	for i in range(N):
		ans+=2**i
	print(ans)
else:
	
	while P<N:
		ans+=X
		if X%2!=0:
			X+=1
		X//=2
		P+=1
		if X==1:
			break
	print(ans+N-P)	
0