結果

問題 No.1398 調和の魔法陣 (構築)
ユーザー tailstails
提出日時 2021-02-19 21:49:31
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 965 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 5,368 KB
最終ジャッジ日時 2023-10-15 00:53:58
合計ジャッジ時間 30,025 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,192 KB
testcase_01 AC 7 ms
5,228 KB
testcase_02 WA -
testcase_03 AC 6 ms
5,064 KB
testcase_04 AC 6 ms
5,312 KB
testcase_05 AC 6 ms
5,204 KB
testcase_06 AC 139 ms
5,164 KB
testcase_07 WA -
testcase_08 AC 133 ms
5,148 KB
testcase_09 AC 140 ms
5,092 KB
testcase_10 WA -
testcase_11 AC 142 ms
5,224 KB
testcase_12 WA -
testcase_13 AC 131 ms
5,224 KB
testcase_14 AC 140 ms
5,324 KB
testcase_15 WA -
testcase_16 AC 117 ms
5,104 KB
testcase_17 AC 125 ms
5,224 KB
testcase_18 AC 132 ms
5,032 KB
testcase_19 AC 140 ms
5,164 KB
testcase_20 WA -
testcase_21 AC 133 ms
5,224 KB
testcase_22 AC 140 ms
5,096 KB
testcase_23 WA -
testcase_24 AC 140 ms
5,032 KB
testcase_25 WA -
testcase_26 AC 134 ms
5,084 KB
testcase_27 AC 140 ms
5,164 KB
testcase_28 WA -
testcase_29 AC 140 ms
5,064 KB
testcase_30 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::a" used only once: possible typo at Main.pl line 12.
Main.pl syntax OK

ソースコード

diff #

($w,$h,$z)=glob<>;
$s=$w%3==2?2:1;
$t=$h%3==2?2:1;

if($z>$s*$t*9){
	print -1;
	exit;
}

for$y(0..$h-1){
	for$x(0..$w-1){
		print $a[$y%3*3+$x%3]//=do{$y%3==2||($h-$y)%3==0||$x%3==2||($w-$x)%3==0 ? 0 : $z>9?($z-=9,9):($t=$z,$z=0,$t)};
	}
	print$/;
}
0