結果
| 問題 |
No.378 名声値を稼ごう
|
| コンテスト | |
| ユーザー |
_KingdomOfMoray
|
| 提出日時 | 2020-01-05 07:51:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 623 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-22 21:56:12 |
| 合計ジャッジ時間 | 862 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 2 |
ソースコード
import math
n = int(input())
normal_list = []
cumula_list = [] # cumulative_list
skill_list = []
cur = n
while True:
normal_list.append(cur)
cur = math.floor(cur / 2)
if cur < 1:
break
for i in range(len(normal_list)):
if i == 0:
cumula_list.append(normal_list[i])
else:
cumula_list.append(cumula_list[i - 1] + normal_list[i])
for i in range(len(normal_list)):
if i == 0:
skill_list.append(2 * cumula_list[i])
else:
skill_list.append(cumula_list[i - 1] + 2 * normal_list[i])
print(max(skill_list) - cumula_list[len(cumula_list) - 1])
_KingdomOfMoray