結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,072 KB
testcase_01 AC 6 ms
5,088 KB
testcase_02 WA -
testcase_03 AC 6 ms
5,156 KB
testcase_04 AC 6 ms
5,152 KB
testcase_05 AC 6 ms
5,204 KB
testcase_06 AC 140 ms
5,096 KB
testcase_07 WA -
testcase_08 AC 133 ms
5,272 KB
testcase_09 AC 140 ms
5,092 KB
testcase_10 WA -
testcase_11 AC 141 ms
5,212 KB
testcase_12 WA -
testcase_13 AC 132 ms
5,072 KB
testcase_14 AC 140 ms
5,316 KB
testcase_15 WA -
testcase_16 AC 118 ms
5,096 KB
testcase_17 AC 125 ms
5,196 KB
testcase_18 AC 131 ms
5,148 KB
testcase_19 AC 140 ms
5,092 KB
testcase_20 WA -
testcase_21 AC 133 ms
5,156 KB
testcase_22 AC 141 ms
5,220 KB
testcase_23 WA -
testcase_24 AC 140 ms
5,068 KB
testcase_25 WA -
testcase_26 AC 132 ms
5,196 KB
testcase_27 AC 141 ms
5,204 KB
testcase_28 WA -
testcase_29 AC 141 ms
5,220 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)*int(($w+2)/3);
$t=($h%3==2?2:1)*int(($h+2)/3);

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