結果

問題 No.378 名声値を稼ごう
ユーザー caleicalei
提出日時 2020-01-31 05:06:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 10,460 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-15 22:19:22
合計ジャッジ時間 678 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,772 KB
testcase_01 AC 15 ms
7,940 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 14 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# yukicoder No.378 名声値を稼ごう 2020/01/31

n=int(input())
res=n
mx=n*2
while n:
    n//=2
    mx=max(mx,res+n*2)
    res+=n
print(mx-res)
0