結果

問題 No.883 ぬりえ
ユーザー tailstails
提出日時 2019-09-13 22:42:33
言語 Perl
(5.38.2)
結果
TLE  
実行時間 -
コード長 255 bytes
コンパイル時間 507 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 9,720 KB
最終ジャッジ日時 2023-09-17 14:53:11
合計ジャッジ時間 4,410 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,124 KB
testcase_01 AC 6 ms
5,208 KB
testcase_02 AC 7 ms
5,148 KB
testcase_03 AC 6 ms
5,264 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$k)=glob<>;
$m=int(($n-1)/$k)+1;
print$m,$/;
for(0..$n-1){
	while($a[$y][$x]){
		$x=($x+1)%$m;
	}
	$a[$y][$x]=1;
	$x=($x+1)%$m;
	$y=($y+1)%$m;
}

for$y(0..$m-1){
	for$x(0..$m-1){
		if($a[$y][$x]){
			print'#';
		}else{
			print'.';
		}
	}
	print$/;
}
0