結果
問題 | No.542 1円玉と5円玉 |
ユーザー |
![]() |
提出日時 | 2019-01-20 17:40:38 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 96 ms / 2,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-09-13 19:54:06 |
合計ジャッジ時間 | 2,156 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
Syntax OK
ソースコード
# Your code here!a = gets.chomp.split(" ").map(&:to_i)res = []skip = falseif a[0] == 0skip = truea[0] = 1end1.step(a[0]) do |i|res << i if not skip5.step(5 * a[1],5) do |j|res << j if not res.include?(j)res << i + j if not skipendendres.sort.uniq.each { |k| puts k }