結果

問題 No.455 冬の大三角
ユーザー fal_rndfal_rnd
提出日時 2016-12-06 22:39:00
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 2,008 ms
コンパイル使用メモリ 74,144 KB
実行使用メモリ 41,904 KB
最終ジャッジ日時 2024-05-06 01:24:12
合計ジャッジ時間 10,783 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
40,252 KB
testcase_01 AC 112 ms
40,908 KB
testcase_02 AC 115 ms
41,088 KB
testcase_03 AC 117 ms
41,248 KB
testcase_04 AC 119 ms
41,484 KB
testcase_05 AC 114 ms
41,088 KB
testcase_06 WA -
testcase_07 AC 119 ms
41,400 KB
testcase_08 AC 156 ms
41,704 KB
testcase_09 AC 114 ms
40,984 KB
testcase_10 AC 109 ms
41,292 KB
testcase_11 AC 107 ms
40,876 KB
testcase_12 AC 108 ms
41,068 KB
testcase_13 AC 115 ms
40,852 KB
testcase_14 AC 111 ms
41,112 KB
testcase_15 AC 107 ms
40,368 KB
testcase_16 AC 112 ms
39,980 KB
testcase_17 AC 102 ms
40,164 KB
testcase_18 AC 109 ms
40,916 KB
testcase_19 AC 104 ms
40,396 KB
testcase_20 AC 111 ms
41,032 KB
testcase_21 AC 113 ms
40,892 KB
testcase_22 WA -
testcase_23 AC 108 ms
40,136 KB
testcase_24 AC 113 ms
41,000 KB
testcase_25 AC 131 ms
41,288 KB
testcase_26 AC 97 ms
39,648 KB
testcase_27 AC 110 ms
40,868 KB
testcase_28 AC 123 ms
41,144 KB
testcase_29 AC 150 ms
41,240 KB
testcase_30 AC 128 ms
40,916 KB
testcase_31 AC 150 ms
41,060 KB
testcase_32 AC 124 ms
40,812 KB
testcase_33 AC 146 ms
41,496 KB
testcase_34 AC 137 ms
41,904 KB
testcase_35 AC 140 ms
41,344 KB
testcase_36 AC 144 ms
41,580 KB
testcase_37 AC 136 ms
41,368 KB
testcase_38 AC 117 ms
40,220 KB
testcase_39 AC 153 ms
41,312 KB
testcase_40 AC 152 ms
41,132 KB
testcase_41 AC 130 ms
41,540 KB
testcase_42 AC 126 ms
41,236 KB
testcase_43 AC 132 ms
41,196 KB
testcase_44 AC 118 ms
41,228 KB
testcase_45 AC 140 ms
41,352 KB
testcase_46 AC 118 ms
41,524 KB
testcase_47 AC 124 ms
41,324 KB
testcase_48 AC 120 ms
41,184 KB
testcase_49 AC 110 ms
41,100 KB
testcase_50 AC 100 ms
39,896 KB
testcase_51 AC 106 ms
40,252 KB
testcase_52 AC 125 ms
40,988 KB
testcase_53 AC 128 ms
41,244 KB
testcase_54 AC 115 ms
41,032 KB
testcase_55 AC 103 ms
40,072 KB
testcase_56 AC 116 ms
41,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package src;

import java.util.*;
class C{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		String[] in=new String[s.nextInt()];
		s.next();
		int b=0;
		for(int i=0;i<in.length;++i) {
			in[i]=s.next();
		}
		for(int i=0;i<in.length-1;++i) {
			if(in[i].matches(".*\\*.*")) {
				if(in[i].matches(".*\\*.*\\*.*")) {
					b=i;
					break;
				}
				in[i]=in[i].replaceFirst("-", "*");
				for(String a:in) {
					System.out.println(a);
				}
				return;
			}
		}
		in[b+1]=in[b+1].replaceFirst("-", "*");
		for(String a:in) {
			System.out.println(a);
		}
	}
}
0