結果

問題 No.166 マス埋めゲーム
ユーザー togaerror
提出日時 2015-03-25 15:44:28
言語 Perl
(5.40.0)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-29 00:50:59
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/perl

use warnings;
use strict;

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

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

exit;
0