提出 #198137


ソースコード 拡げる

use strict;
use warnings;

chomp(my $C = <>);
for (1..$C) {
    chomp(my $line = <>);
    my ($N, $M) = split ' ', $line;
    print solve($N, $M), "\n";
}

sub solve {
    my ($n, $m) = @_;
    return "Impossible" if $n <= 1 or $m <= 1; 
    my $area = $n * $m;
    return "Impossible" if $area < 16;
    return $area % 8 ? "Impossible" : "Possible";
}

提出情報

提出日時
問題 E - 何しちゃおっかな?
ユーザ rono_funatsu
言語 Perl (5.14.2)
得点 400
コード長 370 Byte
結果 AC
実行時間 61 ms
メモリ 1312 KiB

コンパイルエラー

./Main.pl syntax OK

ジャッジ結果

セット名 All
得点 / 配点 400 / 400
結果
AC × 11
セット名 テストケース
All large_01.txt, large_02.txt, large_03.txt, large_04.txt, large_05.txt, large_06.txt, large_07.txt, large_08.txt, large_09.txt, large_10.txt, small_00.txt
ケース名 結果 実行時間 メモリ
large_01.txt AC 61 ms 1244 KiB
large_02.txt AC 58 ms 1312 KiB
large_03.txt AC 58 ms 1188 KiB
large_04.txt AC 59 ms 1184 KiB
large_05.txt AC 58 ms 1308 KiB
large_06.txt AC 59 ms 1188 KiB
large_07.txt AC 56 ms 1188 KiB
large_08.txt AC 61 ms 1180 KiB
large_09.txt AC 59 ms 1268 KiB
large_10.txt AC 60 ms 1312 KiB
sample.txt AC 25 ms 1176 KiB
small_00.txt AC 25 ms 1308 KiB