結果
| 問題 |
No.9002 FizzBuzz(テスト用)
|
| ユーザー |
|
| 提出日時 | 2017-08-16 10:00:10 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 5,000 ms |
| コード長 | 172 bytes |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-10-13 12:49:38 |
| 合計ジャッジ時間 | 906 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
Main.rb:4: warning: `%' after local variable or literal is interpreted as binary operator Main.rb:4: warning: even though it seems like string literal Main.rb:4: warning: `%' after local variable or literal is interpreted as binary operator Main.rb:4: warning: even though it seems like string literal Main.rb:6: warning: `%' after local variable or literal is interpreted as binary operator Main.rb:6: warning: even though it seems like string literal Main.rb:8: warning: `%' after local variable or literal is interpreted as binary operator Main.rb:8: warning: even though it seems like string literal Syntax OK
ソースコード
n = gets.to_i
for i in 1..n
if i %3 == 0 && i %5 == 0
puts "FizzBuzz"
elsif i %3 == 0
puts "Fizz"
elsif i %5 == 0
puts "Buzz"
else
puts i
end
end