結果

問題 No.883 ぬりえ
ユーザー %20%20
提出日時 2019-09-20 05:27:07
言語 Perl
(5.38.2)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 1,000 ms
コンパイル使用メモリ 5,204 KB
実行使用メモリ 84,028 KB
最終ジャッジ日時 2023-10-11 14:14:54
合計ジャッジ時間 2,707 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,152 KB
testcase_01 AC 6 ms
5,292 KB
testcase_02 AC 6 ms
5,092 KB
testcase_03 AC 6 ms
5,092 KB
testcase_04 AC 6 ms
5,204 KB
testcase_05 AC 6 ms
5,220 KB
testcase_06 AC 6 ms
5,160 KB
testcase_07 AC 6 ms
5,208 KB
testcase_08 AC 6 ms
5,300 KB
testcase_09 AC 6 ms
5,152 KB
testcase_10 AC 6 ms
5,160 KB
testcase_11 AC 6 ms
5,324 KB
testcase_12 AC 6 ms
5,160 KB
testcase_13 AC 6 ms
5,200 KB
testcase_14 AC 6 ms
5,408 KB
testcase_15 AC 197 ms
84,028 KB
testcase_16 AC 53 ms
24,804 KB
testcase_17 AC 27 ms
14,148 KB
testcase_18 AC 7 ms
5,096 KB
testcase_19 AC 6 ms
5,204 KB
testcase_20 AC 6 ms
5,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($N,$K)=glob<>;
$M=($N-1)/$K+1|0;
$M++while$M*$M<$N;
print$M,$/;
@A=map[('.')x$M,$/],1..$M;
for$i(0..$M-1){
	for$j(0..$M-1){
		if($N--){
			$A[$j][($i+$j)%$M]='#'
		}else{
			goto z
		}
	}
}
z:print@$_ for@A
0