結果

問題 No.378 名声値を稼ごう
ユーザー DexctersuDexctersu
提出日時 2018-01-12 19:23:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 112 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-08-25 15:48:27
合計ジャッジ時間 958 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n=int(input())
a=n
sum=n
half=2*(n//2)
while n!=0:
    sum+=n//2
    n//=2

print(max(sum-(half+a),half+a-sum))
0