結果
| 問題 |
No.555 世界史のレポート
|
| ユーザー |
💕💖💞
|
| 提出日時 | 2018-08-19 20:41:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 710 bytes |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-21 13:42:27 |
| 合計ジャッジ時間 | 2,140 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 17 |
ソースコード
N = int(input())
c, v = map(int, input().split())
s = 'A'
buff = None
cost = 0
from collections import namedtuple
items = []
Item = namedtuple('Item', ('cost', 's', 'buff') )
def copy_paste(s):
global cost
# copy
cost += c
buff = s
# paste
cost += v
s += buff
item = Item(cost, s, buff)
items.append(item)
#print(item)
return s
for i in range(10):
prev = s
s = (copy_paste(s))
if len(s) > N:
break
# print(s)
#print(cost)
##print(prev)
import math
costs = []
for item in items[:-1]:
cost = item.cost
cost += v* math.ceil((N - len(item.s))/ len( item.buff ) )
#print(item, (N-len(item.s)), len( item.buff ), item.cost, cost)
costs.append(cost)
print(min(costs))
💕💖💞