結果
問題 |
No.542 1円玉と5円玉
|
ユーザー |
|
提出日時 | 2017-11-12 16:55:57 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 213 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,800 KB |
最終ジャッジ日時 | 2024-11-24 23:14:35 |
合計ジャッジ時間 | 2,057 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 7 |
コンパイルメッセージ
Syntax OK
ソースコード
ones, fives = gets.chomp.split.map(&:to_i) list ,sum = Array.new, 0 1.upto(ones){ |one| list << sum += 1 } sum = 0 1.upto(fives){ |five| list << sum += 5 1.upto(ones){ |one| list << sum += 1 } } puts list.uniq