結果

問題 No.1398 調和の魔法陣 (構築)
ユーザー %20%20
提出日時 2021-02-20 02:58:06
言語 Perl
(5.38.2)
結果
AC  
実行時間 92 ms / 3,153 ms
コード長 210 bytes
コンパイル時間 645 ms
コンパイル使用メモリ 6,092 KB
実行使用メモリ 6,076 KB
最終ジャッジ日時 2023-10-17 07:24:29
合計ジャッジ時間 30,337 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,064 KB
testcase_01 AC 8 ms
6,076 KB
testcase_02 AC 8 ms
6,064 KB
testcase_03 AC 7 ms
6,064 KB
testcase_04 AC 7 ms
6,072 KB
testcase_05 AC 8 ms
6,068 KB
testcase_06 AC 90 ms
6,076 KB
testcase_07 AC 7 ms
6,072 KB
testcase_08 AC 91 ms
6,076 KB
testcase_09 AC 90 ms
6,076 KB
testcase_10 AC 8 ms
6,068 KB
testcase_11 AC 89 ms
6,076 KB
testcase_12 AC 7 ms
6,072 KB
testcase_13 AC 89 ms
6,076 KB
testcase_14 AC 88 ms
6,076 KB
testcase_15 AC 8 ms
6,064 KB
testcase_16 AC 89 ms
6,076 KB
testcase_17 AC 91 ms
6,076 KB
testcase_18 AC 90 ms
6,076 KB
testcase_19 AC 90 ms
6,072 KB
testcase_20 AC 8 ms
6,068 KB
testcase_21 AC 91 ms
6,076 KB
testcase_22 AC 90 ms
6,068 KB
testcase_23 AC 7 ms
6,072 KB
testcase_24 AC 92 ms
6,068 KB
testcase_25 AC 7 ms
6,064 KB
testcase_26 AC 91 ms
6,064 KB
testcase_27 AC 92 ms
6,064 KB
testcase_28 AC 7 ms
6,072 KB
testcase_29 AC 91 ms
6,068 KB
testcase_30 AC 7 ms
6,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($W,$H,$X)=glob<>;
for$i(0..$H%3/2){
	for$j(0..$W%3/2){
		$X-=$_[$i+!($H%3)][$j+!($W%3)]=$X<9?$X:9
	}
}
if($X){
	print-1,$/
}else{
	for$i(0..$H-1){
		for$j(0..$W-1){
			print$_[$i%3][$j%3]+0
		}
		print$/
	}
}
0