結果
問題 |
No.385 カップ麺生活
|
ユーザー |
![]() |
提出日時 | 2016-09-18 09:30:53 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 153 bytes |
コンパイル時間 | 140 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 18,688 KB |
最終ジャッジ日時 | 2024-11-17 08:51:09 |
合計ジャッジ時間 | 5,189 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 RE * 1 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n Syntax OK
ソースコード
require"prime" m,n,*c=$<.read.split.map &:to_i s=m/c.min a=[] f=->x{a[x]||=c.map{|e|x==e ?1:(x>e&&0<t=f[x-e])?t+1:0}.max} Prime.each(m){|p|s+=f[m-p]} p s