結果

問題 No.555 世界史のレポート
ユーザー mbanmban
提出日時 2017-08-12 02:35:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,140 KB
実行使用メモリ 63,132 KB
最終ジャッジ日時 2024-04-21 00:35:48
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,440 KB
testcase_01 AC 37 ms
52,264 KB
testcase_02 AC 39 ms
53,812 KB
testcase_03 AC 45 ms
59,120 KB
testcase_04 AC 45 ms
59,760 KB
testcase_05 AC 45 ms
60,348 KB
testcase_06 AC 45 ms
60,596 KB
testcase_07 AC 46 ms
60,560 KB
testcase_08 AC 50 ms
59,664 KB
testcase_09 AC 46 ms
59,672 KB
testcase_10 AC 51 ms
62,128 KB
testcase_11 AC 52 ms
62,204 KB
testcase_12 AC 52 ms
62,124 KB
testcase_13 AC 52 ms
63,132 KB
testcase_14 AC 52 ms
61,512 KB
testcase_15 AC 52 ms
62,168 KB
testcase_16 AC 52 ms
61,276 KB
testcase_17 AC 52 ms
61,880 KB
testcase_18 AC 52 ms
61,508 KB
testcase_19 AC 54 ms
61,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
line=input().split()
C=int(line[0])
V=int(line[1])
dp=[2000000000 for i in range(2*N-1)]
dp[1]=0
for i in range(1,N):
    t=dp[i]+C
    index=i
    while index<N :
        index+=i
        t+=V
        dp[index]=min(dp[index],t)
ans=2000000000
for i in range(N,2*N-1):
    ans=min(ans,dp[i])
print(ans)
        
    
0