結果

問題 No.1869 Doubling?
ユーザー octet9445octet9445
提出日時 2022-03-15 17:46:35
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 81,596 KB
実行使用メモリ 61,596 KB
最終ジャッジ日時 2023-10-22 08:29:12
合計ジャッジ時間 27,717 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,448 KB
testcase_01 AC 42 ms
57,432 KB
testcase_02 AC 38 ms
53,404 KB
testcase_03 AC 814 ms
57,432 KB
testcase_04 TLE -
testcase_05 TLE -
testcase_06 AC 39 ms
53,404 KB
testcase_07 AC 38 ms
53,404 KB
testcase_08 AC 38 ms
53,404 KB
testcase_09 WA -
testcase_10 AC 38 ms
53,404 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 42 ms
57,432 KB
testcase_16 AC 42 ms
57,432 KB
testcase_17 AC 42 ms
57,432 KB
testcase_18 AC 42 ms
57,432 KB
testcase_19 AC 42 ms
57,432 KB
testcase_20 AC 43 ms
57,432 KB
testcase_21 AC 42 ms
57,432 KB
testcase_22 AC 42 ms
57,432 KB
testcase_23 AC 43 ms
57,432 KB
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 AC 39 ms
53,448 KB
testcase_34 AC 39 ms
53,448 KB
testcase_35 AC 39 ms
53,448 KB
testcase_36 AC 39 ms
53,448 KB
testcase_37 AC 39 ms
53,448 KB
testcase_38 AC 39 ms
53,448 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 WA -
testcase_45 AC 40 ms
53,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = M
curr = M
for i in range(N-1, 0, -1):
    if curr % 2 == 1:
        curr += 1
        curr //= 2
    else:
        curr //= 2
    ans += curr
    
print (ans)
0