結果

問題 No.455 冬の大三角
ユーザー tailstails
提出日時 2016-12-06 00:12:17
言語 Perl
(5.38.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 5,208 KB
実行使用メモリ 5,404 KB
最終ジャッジ日時 2023-09-12 08:14:32
合計ジャッジ時間 3,368 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,096 KB
testcase_01 AC 6 ms
5,216 KB
testcase_02 AC 6 ms
5,404 KB
testcase_03 AC 6 ms
5,172 KB
testcase_04 AC 6 ms
5,304 KB
testcase_05 AC 6 ms
5,172 KB
testcase_06 AC 6 ms
5,212 KB
testcase_07 AC 6 ms
5,104 KB
testcase_08 AC 7 ms
5,224 KB
testcase_09 AC 6 ms
5,244 KB
testcase_10 AC 6 ms
5,216 KB
testcase_11 AC 6 ms
5,224 KB
testcase_12 AC 6 ms
5,164 KB
testcase_13 AC 6 ms
5,108 KB
testcase_14 AC 6 ms
5,088 KB
testcase_15 AC 6 ms
5,160 KB
testcase_16 AC 6 ms
5,220 KB
testcase_17 AC 6 ms
5,280 KB
testcase_18 AC 6 ms
5,292 KB
testcase_19 AC 6 ms
5,120 KB
testcase_20 AC 6 ms
5,172 KB
testcase_21 AC 6 ms
5,164 KB
testcase_22 AC 6 ms
5,312 KB
testcase_23 AC 6 ms
5,104 KB
testcase_24 AC 6 ms
5,212 KB
testcase_25 AC 6 ms
5,172 KB
testcase_26 AC 6 ms
5,116 KB
testcase_27 AC 6 ms
5,172 KB
testcase_28 AC 6 ms
5,232 KB
testcase_29 AC 7 ms
5,220 KB
testcase_30 AC 6 ms
5,216 KB
testcase_31 AC 6 ms
5,288 KB
testcase_32 AC 6 ms
5,224 KB
testcase_33 AC 7 ms
5,104 KB
testcase_34 AC 6 ms
5,304 KB
testcase_35 AC 7 ms
5,240 KB
testcase_36 AC 7 ms
5,112 KB
testcase_37 AC 7 ms
5,296 KB
testcase_38 AC 6 ms
5,232 KB
testcase_39 AC 7 ms
5,164 KB
testcase_40 AC 7 ms
5,096 KB
testcase_41 AC 7 ms
5,216 KB
testcase_42 AC 6 ms
5,228 KB
testcase_43 AC 6 ms
5,160 KB
testcase_44 AC 6 ms
5,292 KB
testcase_45 AC 6 ms
5,308 KB
testcase_46 AC 6 ms
5,288 KB
testcase_47 AC 6 ms
5,232 KB
testcase_48 AC 6 ms
5,232 KB
testcase_49 AC 7 ms
5,212 KB
testcase_50 AC 6 ms
5,172 KB
testcase_51 AC 6 ms
5,104 KB
testcase_52 AC 6 ms
5,172 KB
testcase_53 AC 6 ms
5,096 KB
testcase_54 AC 6 ms
5,156 KB
testcase_55 AC 6 ms
5,172 KB
testcase_56 AC 6 ms
5,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($h,$w)=glob<>;
for$y(0..$h-1){
	push@a,$_=<>;
	for$x(0..$w-1){
		if(substr($_,$x,1)eq'*'){
			$y2=$y1;$y1=$y;
			$x2=$x1;$x1=$x;
		}
	}
}
for$y(0..$h-1){
	for$x(0..$w-1){
		if(($y-$y1)*($x-$x2)!=($y-$y2)*($x-$x1)){
			substr$a[$y],$x,1,'*';
			print@a;
			exit;
		}
	}
}
0