結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | Henriettafn |
提出日時 | 2017-08-16 10:00:10 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 83 ms / 5,000 ms |
コード長 | 172 bytes |
コンパイル時間 | 43 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-04-21 14:08:06 |
合計ジャッジ時間 | 955 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 83 ms
12,160 KB |
testcase_01 | AC | 82 ms
12,160 KB |
testcase_02 | AC | 76 ms
12,288 KB |
testcase_03 | AC | 76 ms
12,160 KB |
コンパイルメッセージ
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