結果

問題 No.207 世界のなんとか
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-05-16 14:06:49
言語 Perl
(5.38.2)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 364 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 5,392 KB
実行使用メモリ 5,600 KB
最終ジャッジ日時 2023-10-17 06:52:52
合計ジャッジ時間 1,616 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,584 KB
testcase_01 AC 3 ms
5,580 KB
testcase_02 AC 4 ms
5,600 KB
testcase_03 AC 3 ms
5,584 KB
testcase_04 AC 4 ms
5,584 KB
testcase_05 AC 3 ms
5,588 KB
testcase_06 AC 4 ms
5,576 KB
testcase_07 AC 3 ms
5,580 KB
testcase_08 AC 4 ms
5,580 KB
testcase_09 AC 3 ms
5,588 KB
testcase_10 AC 4 ms
5,600 KB
testcase_11 AC 4 ms
5,588 KB
testcase_12 AC 3 ms
5,600 KB
testcase_13 AC 3 ms
5,600 KB
testcase_14 AC 3 ms
5,600 KB
testcase_15 AC 4 ms
5,588 KB
testcase_16 AC 3 ms
5,580 KB
testcase_17 AC 3 ms
5,580 KB
testcase_18 AC 3 ms
5,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

my $number = <STDIN>;
chomp ($number);

my ($num1, $num2) = split(/ /, $number);
my @numbers = ($num1..$num2);

my @numbers_3;
for my $num(@numbers){
    if($num % 3 == 0){
        push @numbers_3, $num; 
    }elsif($num =~ /3/){
        push @numbers_3, $num;
    }
}

my @sorted = sort { $a <=> $b } @numbers_3;

for my $sorted(@sorted){
    print "$sorted\n";
}
0