結果

問題 No.555 世界史のレポート
ユーザー pluto77pluto77
提出日時 2018-02-22 13:29:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 7,084 KB
実行使用メモリ 11,256 KB
最終ジャッジ日時 2023-10-25 07:50:07
合計ジャッジ時間 4,507 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,404 KB
testcase_01 AC 11 ms
6,404 KB
testcase_02 AC 11 ms
6,404 KB
testcase_03 AC 12 ms
6,420 KB
testcase_04 AC 13 ms
6,432 KB
testcase_05 AC 12 ms
6,444 KB
testcase_06 AC 14 ms
6,452 KB
testcase_07 AC 14 ms
6,464 KB
testcase_08 AC 15 ms
6,472 KB
testcase_09 AC 15 ms
6,484 KB
testcase_10 AC 215 ms
9,824 KB
testcase_11 AC 237 ms
10,200 KB
testcase_12 AC 208 ms
9,824 KB
testcase_13 AC 182 ms
9,296 KB
testcase_14 AC 230 ms
10,200 KB
testcase_15 AC 235 ms
10,200 KB
testcase_16 AC 204 ms
9,560 KB
testcase_17 AC 222 ms
9,936 KB
testcase_18 AC 242 ms
10,200 KB
testcase_19 AC 312 ms
11,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki555

n=int(raw_input())
c,v=map(int,raw_input().split())
dp=[float('inf') for i in xrange(2*n)]
dp[1]=0
for i in xrange(1,n):
 k=dp[i]+c+v
 idx=i
 while idx<n:
  idx+=i
  dp[idx]=min(dp[idx],k)
  k+=v
res=float('inf')
for i in xrange(n,2*n):
 res=min(res,dp[i])
print res
0