結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
42,312 KB
testcase_01 AC 156 ms
42,388 KB
testcase_02 AC 157 ms
42,484 KB
testcase_03 AC 158 ms
42,404 KB
testcase_04 AC 144 ms
42,088 KB
testcase_05 AC 154 ms
42,160 KB
testcase_06 AC 158 ms
42,092 KB
testcase_07 AC 159 ms
42,496 KB
testcase_08 AC 154 ms
42,060 KB
testcase_09 AC 140 ms
41,808 KB
testcase_10 AC 155 ms
42,608 KB
testcase_11 AC 161 ms
42,328 KB
testcase_12 AC 155 ms
42,096 KB
testcase_13 AC 310 ms
48,856 KB
testcase_14 AC 302 ms
47,760 KB
testcase_15 AC 227 ms
43,392 KB
testcase_16 AC 284 ms
45,236 KB
testcase_17 AC 325 ms
49,668 KB
testcase_18 AC 295 ms
45,188 KB
testcase_19 AC 299 ms
48,532 KB
testcase_20 AC 314 ms
47,908 KB
testcase_21 AC 264 ms
45,392 KB
testcase_22 AC 321 ms
48,772 KB
testcase_23 AC 313 ms
48,708 KB
testcase_24 AC 326 ms
47,196 KB
testcase_25 AC 334 ms
48,468 KB
testcase_26 AC 322 ms
47,480 KB
testcase_27 AC 311 ms
47,448 KB
testcase_28 AC 322 ms
47,452 KB
testcase_29 AC 331 ms
48,476 KB
testcase_30 AC 337 ms
47,900 KB
testcase_31 AC 328 ms
48,520 KB
testcase_32 AC 335 ms
47,700 KB
testcase_33 AC 317 ms
47,144 KB
testcase_34 AC 293 ms
46,988 KB
testcase_35 AC 157 ms
42,104 KB
testcase_36 AC 146 ms
41,932 KB
testcase_37 AC 157 ms
42,180 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]);
	    			break;
	    		}
	    	}

	    	}

	    }
0