結果

問題 No.166 マス埋めゲーム
ユーザー togaerrortogaerror
提出日時 2015-03-25 14:41:48
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 5,324 KB
実行使用メモリ 5,084 KB
最終ジャッジ日時 2023-09-11 10:08:04
合計ジャッジ時間 1,575 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
4,784 KB
testcase_01 AC 6 ms
4,920 KB
testcase_02 WA -
testcase_03 AC 6 ms
5,044 KB
testcase_04 AC 5 ms
4,912 KB
testcase_05 AC 5 ms
4,964 KB
testcase_06 AC 5 ms
4,864 KB
testcase_07 AC 6 ms
5,084 KB
testcase_08 AC 5 ms
5,040 KB
testcase_09 AC 5 ms
4,868 KB
testcase_10 AC 5 ms
4,916 KB
testcase_11 AC 5 ms
4,808 KB
testcase_12 AC 5 ms
5,068 KB
testcase_13 AC 5 ms
5,068 KB
testcase_14 AC 5 ms
5,012 KB
testcase_15 AC 5 ms
4,908 KB
testcase_16 AC 5 ms
5,024 KB
testcase_17 WA -
testcase_18 AC 5 ms
4,920 KB
testcase_19 AC 5 ms
5,068 KB
testcase_20 AC 5 ms
4,960 KB
testcase_21 AC 5 ms
5,036 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/perl

use warnings;
use strict;

my ($h, $w, $n, $k) = split / /, <>;

$h *= $w;

if($h % $n == $k) {
	print "YES\n";
} elsif(($h % $k == 0)and($k != 1)) {
	print "YES\n";
} else { 
	print "NO\n";
}

exit;
0