結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー sironekotorosironekotoro
提出日時 2018-11-14 14:35:07
言語 Perl
(5.38.2)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 5,012 KB
最終ジャッジ日時 2023-08-26 01:03:39
合計ジャッジ時間 640 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

use strict;
use warnings;

my $N = <>;
chomp $N;

for my $i ( 1 .. $N ) {
    if ( $i % 15 == 0 ) {
        print "FizzBuzz\n";
    }
    elsif ( $i % 3 == 0 ) {
        print "Fizz\n";
    }
    elsif ( $i % 5 == 0 ) {
        print "Buzz\n";
    }
    else {
        print "$i\n";
    }
}
0