結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-05 10:03:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 355 ms / 1,000 ms
コード長 553 bytes
コンパイル時間 3,706 ms
コンパイル使用メモリ 76,564 KB
実行使用メモリ 49,588 KB
最終ジャッジ日時 2024-04-15 22:50:09
合計ジャッジ時間 15,649 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
42,140 KB
testcase_01 AC 164 ms
42,192 KB
testcase_02 AC 166 ms
42,452 KB
testcase_03 AC 164 ms
42,348 KB
testcase_04 AC 160 ms
42,192 KB
testcase_05 AC 160 ms
42,440 KB
testcase_06 AC 162 ms
42,468 KB
testcase_07 AC 163 ms
42,072 KB
testcase_08 AC 164 ms
42,508 KB
testcase_09 AC 161 ms
42,504 KB
testcase_10 AC 163 ms
42,220 KB
testcase_11 AC 162 ms
42,392 KB
testcase_12 AC 166 ms
42,292 KB
testcase_13 AC 345 ms
49,588 KB
testcase_14 AC 338 ms
48,864 KB
testcase_15 AC 230 ms
43,352 KB
testcase_16 AC 297 ms
45,188 KB
testcase_17 AC 327 ms
48,028 KB
testcase_18 AC 291 ms
44,872 KB
testcase_19 AC 338 ms
48,828 KB
testcase_20 AC 332 ms
48,844 KB
testcase_21 AC 292 ms
45,196 KB
testcase_22 AC 333 ms
47,856 KB
testcase_23 AC 347 ms
47,572 KB
testcase_24 AC 344 ms
47,504 KB
testcase_25 AC 345 ms
47,832 KB
testcase_26 AC 334 ms
47,564 KB
testcase_27 AC 355 ms
48,144 KB
testcase_28 AC 337 ms
47,812 KB
testcase_29 AC 344 ms
47,772 KB
testcase_30 AC 345 ms
47,752 KB
testcase_31 AC 338 ms
48,148 KB
testcase_32 AC 343 ms
47,660 KB
testcase_33 AC 334 ms
47,512 KB
testcase_34 AC 346 ms
49,096 KB
testcase_35 AC 165 ms
42,404 KB
testcase_36 AC 165 ms
42,324 KB
testcase_37 AC 160 ms
42,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	char[] char_Array = sc.nextLine().toCharArray();
	    	sc.close();
	    	char target = '0';
	    	if (char_Array[0] == char_Array[1]) {
	    		target = char_Array[0];}
	    	else {target = char_Array[2];}

	    	for (int i = 0 ; i < char_Array.length; i++) {
	    		if (char_Array[i] != target) {
	    			System.out.println(i + 1 + " " +char_Array[i]);
	    		}
	    	}

	    	}

	    }
0