結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー 3846masa3846masa
提出日時 2015-03-16 03:52:01
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 171 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 5,208 KB
実行使用メモリ 4,576 KB
最終ジャッジ日時 2023-09-11 08:28:11
合計ジャッジ時間 763 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,576 KB
testcase_01 AC 2 ms
4,500 KB
testcase_02 AC 2 ms
4,540 KB
testcase_03 AC 2 ms
4,504 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

chomp(my $num = <STDIN>);
foreach (1..$num) {
    print "Fizz" if ($_%3 == 0);
    print "Buzz" if ($_%5 == 0);
    print $_ if ($_%3 != 0 && $_%5 != 0);
    print "\n";
}
0