結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー 3846masa3846masa
提出日時 2015-06-21 01:51:25
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 201 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 4,584 KB
最終ジャッジ日時 2023-09-21 22:15:49
合計ジャッジ時間 513 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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