結果
問題 | No.8043 yukicoderへようこそ! |
ユーザー |
|
提出日時 | 2019-04-01 21:57:09 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 464 bytes |
コンパイル時間 | 116 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-26 22:37:37 |
合計ジャッジ時間 | 1,084 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
Syntax OK
ソースコード
a = gets(p).split("\n")# p acase a.sizewhen 1N = a[0].to_iif N == 0puts "Hello World!"elseif N > 75p [*1..N].sumelse(1..N).each{|i|s = ""s << "Fizz" if i % 3 == 0s << "Buzz" if i % 5 == 0puts s.empty? ? i : s}endendwhen 2if a[1][" "]p a[1].split.map(&:to_i).sumelseputs "#{a[0].split.map(&:to_i).sum} #{a[1]}"endelsep a[1..-1].map(&:to_i).sumend