結果
問題 |
No.27 板の準備
|
ユーザー |
![]() |
提出日時 | 2020-09-08 11:14:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 193 ms / 5,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-29 11:49:58 |
合計ジャッジ時間 | 4,291 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 |
ソースコード
v=list(map(int, input().split())) m=30 INF=1000 ans=INF import itertools for a, b, c in itertools.combinations(range(1, m+1), 3): dp=[INF]*(m+1) dp[0]=0 for i in range(1, m+1): for x in [a, b, c]: if i>=x: dp[i]=min(dp[i], dp[i-x]+1) ans=min(ans, sum(dp[x] for x in v)) print(ans)