結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-04-24 12:27:29
言語 Perl
(5.38.0)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 5,456 KB
実行使用メモリ 4,568 KB
最終ジャッジ日時 2023-08-07 12:51:41
合計ジャッジ時間 661 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

my $num = <STDIN>;
chomp $num;

my @array = (1..$num);

for my $num1(@array){
    if ($num1 % 3 == 0 && $num1 % 5 == 0) {
      print "FizzBuzz\n";
    } if ($num1 % 3 == 0) {
      print "Fizz\n";
    } if ($num1 % 5 == 0) {
      print "Buzz\n";
    } if ($num1 % 3 != 0 && $num1 % 5 != 0){
      print "$num1\n";
    }
}
0