結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー startcppstartcpp
提出日時 2019-10-26 14:38:40
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 200 bytes
コンパイル時間 464 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2023-10-12 09:07:51
合計ジャッジ時間 1,761 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,360 KB
testcase_01 AC 77 ms
15,136 KB
testcase_02 AC 77 ms
15,224 KB
testcase_03 AC 77 ms
15,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: mismatched indentations at 'elsif' with 'if' at 4
Main.rb:8: warning: mismatched indentations at 'elsif' with 'if' at 4
Main.rb:10: warning: mismatched indentations at 'else' with 'if' at 4
Syntax OK

ソースコード

diff #

N = gets.to_i;

for i in 1..N do
    if i % 15 == 0 then
		print("FizzBuzz\n")
	elsif i % 3 == 0 then
		print("Fizz\n")
	elsif i % 5 == 0 then
		print("Buzz\n")
	else
		print(i)
		print("\n")
	end
end
0