結果

問題 No.378 名声値を稼ごう
ユーザー brthyyjpbrthyyjp
提出日時 2021-02-09 22:51:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 136 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 71,468 KB
最終ジャッジ日時 2023-09-21 10:37:08
合計ジャッジ時間 1,496 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,468 KB
testcase_01 AC 65 ms
71,468 KB
testcase_02 AC 65 ms
71,280 KB
testcase_03 AC 66 ms
71,372 KB
testcase_04 AC 66 ms
71,380 KB
testcase_05 AC 67 ms
71,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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