結果

問題 No.455 冬の大三角
ユーザー fal_rndfal_rnd
提出日時 2016-12-06 22:40:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 178 ms / 2,000 ms
コード長 621 bytes
コンパイル時間 2,423 ms
コンパイル使用メモリ 71,448 KB
実行使用メモリ 57,736 KB
最終ジャッジ日時 2023-09-12 08:31:52
合計ジャッジ時間 13,432 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,508 KB
testcase_01 AC 124 ms
55,672 KB
testcase_02 AC 130 ms
55,824 KB
testcase_03 AC 124 ms
55,748 KB
testcase_04 AC 122 ms
55,652 KB
testcase_05 AC 122 ms
55,876 KB
testcase_06 AC 129 ms
55,976 KB
testcase_07 AC 121 ms
55,636 KB
testcase_08 AC 162 ms
56,672 KB
testcase_09 AC 122 ms
56,100 KB
testcase_10 AC 121 ms
55,692 KB
testcase_11 AC 125 ms
55,876 KB
testcase_12 AC 123 ms
55,564 KB
testcase_13 AC 121 ms
56,328 KB
testcase_14 AC 125 ms
55,800 KB
testcase_15 AC 122 ms
55,372 KB
testcase_16 AC 123 ms
55,752 KB
testcase_17 AC 127 ms
55,832 KB
testcase_18 AC 125 ms
55,400 KB
testcase_19 AC 122 ms
55,860 KB
testcase_20 AC 121 ms
55,740 KB
testcase_21 AC 123 ms
57,736 KB
testcase_22 AC 122 ms
55,804 KB
testcase_23 AC 123 ms
55,508 KB
testcase_24 AC 124 ms
55,616 KB
testcase_25 AC 126 ms
55,692 KB
testcase_26 AC 125 ms
55,728 KB
testcase_27 AC 122 ms
55,536 KB
testcase_28 AC 123 ms
57,380 KB
testcase_29 AC 169 ms
56,268 KB
testcase_30 AC 145 ms
55,464 KB
testcase_31 AC 149 ms
55,568 KB
testcase_32 AC 137 ms
55,976 KB
testcase_33 AC 178 ms
56,168 KB
testcase_34 AC 134 ms
55,664 KB
testcase_35 AC 160 ms
56,548 KB
testcase_36 AC 143 ms
55,400 KB
testcase_37 AC 142 ms
55,868 KB
testcase_38 AC 138 ms
55,536 KB
testcase_39 AC 177 ms
56,232 KB
testcase_40 AC 169 ms
56,264 KB
testcase_41 AC 147 ms
55,444 KB
testcase_42 AC 143 ms
55,392 KB
testcase_43 AC 141 ms
55,392 KB
testcase_44 AC 136 ms
55,712 KB
testcase_45 AC 160 ms
56,188 KB
testcase_46 AC 145 ms
55,692 KB
testcase_47 AC 147 ms
55,728 KB
testcase_48 AC 138 ms
55,512 KB
testcase_49 AC 125 ms
55,396 KB
testcase_50 AC 125 ms
55,392 KB
testcase_51 AC 126 ms
55,828 KB
testcase_52 AC 133 ms
55,812 KB
testcase_53 AC 132 ms
54,144 KB
testcase_54 AC 126 ms
55,656 KB
testcase_55 AC 129 ms
55,648 KB
testcase_56 AC 136 ms
55,540 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;++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.length]=in[(b+1)%in.length].replaceFirst("-", "*");
		for(String a:in) {
			System.out.println(a);
		}
	}
}
0