結果

問題 No.378 名声値を稼ごう
ユーザー lloyzlloyz
提出日時 2023-02-01 00:00:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 71,020 KB
最終ジャッジ日時 2023-09-13 15:23:46
合計ジャッジ時間 1,636 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
70,928 KB
testcase_01 AC 73 ms
70,780 KB
testcase_02 AC 73 ms
70,624 KB
testcase_03 AC 75 ms
71,020 KB
testcase_04 AC 75 ms
70,776 KB
testcase_05 AC 74 ms
70,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

ans = 0
res = 0
while n > 0:
    ans = max(ans, res + 2 * n)
    res += n
    n //= 2
print(ans - res)
0