結果

問題 No.455 冬の大三角
ユーザー fal_rndfal_rnd
提出日時 2016-12-06 22:38:11
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 597 bytes
コンパイル時間 1,930 ms
コンパイル使用メモリ 73,596 KB
実行使用メモリ 41,800 KB
最終ジャッジ日時 2024-05-06 01:23:29
合計ジャッジ時間 10,809 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
40,984 KB
testcase_01 AC 108 ms
40,608 KB
testcase_02 AC 113 ms
41,008 KB
testcase_03 AC 102 ms
40,208 KB
testcase_04 AC 109 ms
41,352 KB
testcase_05 AC 106 ms
40,840 KB
testcase_06 RE -
testcase_07 AC 99 ms
40,128 KB
testcase_08 AC 145 ms
41,668 KB
testcase_09 AC 110 ms
41,112 KB
testcase_10 RE -
testcase_11 AC 109 ms
41,028 KB
testcase_12 AC 104 ms
39,996 KB
testcase_13 AC 109 ms
40,152 KB
testcase_14 AC 103 ms
40,048 KB
testcase_15 AC 103 ms
40,440 KB
testcase_16 AC 110 ms
41,176 KB
testcase_17 AC 110 ms
41,020 KB
testcase_18 AC 108 ms
40,600 KB
testcase_19 AC 95 ms
39,700 KB
testcase_20 AC 112 ms
40,884 KB
testcase_21 AC 109 ms
41,000 KB
testcase_22 RE -
testcase_23 AC 111 ms
41,268 KB
testcase_24 AC 105 ms
40,484 KB
testcase_25 AC 101 ms
40,028 KB
testcase_26 AC 94 ms
39,996 KB
testcase_27 AC 109 ms
41,192 KB
testcase_28 AC 109 ms
41,132 KB
testcase_29 AC 131 ms
41,084 KB
testcase_30 AC 125 ms
41,352 KB
testcase_31 AC 131 ms
40,968 KB
testcase_32 AC 131 ms
41,332 KB
testcase_33 AC 146 ms
41,172 KB
testcase_34 AC 118 ms
40,908 KB
testcase_35 AC 142 ms
41,124 KB
testcase_36 AC 125 ms
41,164 KB
testcase_37 AC 125 ms
41,268 KB
testcase_38 AC 108 ms
40,808 KB
testcase_39 AC 133 ms
41,800 KB
testcase_40 AC 143 ms
41,096 KB
testcase_41 AC 131 ms
41,052 KB
testcase_42 AC 127 ms
40,200 KB
testcase_43 AC 125 ms
41,000 KB
testcase_44 AC 118 ms
40,152 KB
testcase_45 AC 144 ms
41,460 KB
testcase_46 AC 121 ms
41,196 KB
testcase_47 AC 129 ms
41,316 KB
testcase_48 AC 121 ms
40,980 KB
testcase_49 AC 99 ms
40,176 KB
testcase_50 AC 98 ms
40,128 KB
testcase_51 AC 109 ms
41,004 KB
testcase_52 AC 128 ms
41,264 KB
testcase_53 AC 108 ms
40,028 KB
testcase_54 AC 112 ms
39,952 KB
testcase_55 AC 120 ms
41,260 KB
testcase_56 AC 118 ms
41,124 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=1;i<in.length;++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