結果

問題 No.2416 vs Slime
ユーザー emoanyemoany
提出日時 2023-08-12 14:18:02
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 571 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-30 05:36:24
合計ジャッジ時間 2,136 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,760 KB
testcase_01 AC 5 ms
5,760 KB
testcase_02 AC 4 ms
5,760 KB
testcase_03 AC 5 ms
5,760 KB
testcase_04 AC 6 ms
5,888 KB
testcase_05 AC 5 ms
5,760 KB
testcase_06 AC 5 ms
5,760 KB
testcase_07 AC 5 ms
5,888 KB
testcase_08 AC 6 ms
5,632 KB
testcase_09 AC 5 ms
5,632 KB
testcase_10 AC 6 ms
5,760 KB
testcase_11 AC 5 ms
5,760 KB
testcase_12 AC 5 ms
5,760 KB
testcase_13 AC 6 ms
5,632 KB
testcase_14 AC 5 ms
5,760 KB
testcase_15 AC 6 ms
5,760 KB
testcase_16 AC 4 ms
5,760 KB
testcase_17 AC 5 ms
5,632 KB
testcase_18 AC 5 ms
5,760 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 5 ms
5,760 KB
testcase_22 AC 5 ms
5,632 KB
testcase_23 WA -
testcase_24 AC 5 ms
5,888 KB
testcase_25 WA -
testcase_26 AC 6 ms
5,760 KB
testcase_27 AC 7 ms
5,760 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 5 ms
5,760 KB
testcase_37 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;

my $verbose = 0;

my ($h, $a) = split /[ \n]/, <>;

my @enemy = ($h);
my $count = 0;

print $#enemy, "\n" if ($verbose);

while ($#enemy >= 0) {
    if ($verbose) {
        print "enemy : ";
        for (@enemy) {
            print "$_, ";
        }
        print "\n";
    }
    my $x = pop @enemy;
    my $y = int($x / $a);
    print "y = $y\n" if ($verbose);
    $count++;
    print "count = $count\n" if ($verbose);

    if ($y > 0) {
        push @enemy, $y;
        $count++;
    }
}

print "count = " if ($verbose);
print $count, "\n";
0