結果

問題 No.1217 せしすせそ
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-03 10:05:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 551 bytes
コンパイル時間 3,670 ms
コンパイル使用メモリ 76,248 KB
実行使用メモリ 55,120 KB
最終ジャッジ日時 2024-04-14 05:52:47
合計ジャッジ時間 6,722 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
54,984 KB
testcase_01 AC 157 ms
55,040 KB
testcase_02 AC 158 ms
54,864 KB
testcase_03 AC 157 ms
55,076 KB
testcase_04 AC 158 ms
54,872 KB
testcase_05 AC 159 ms
54,876 KB
testcase_06 AC 160 ms
55,120 KB
testcase_07 AC 157 ms
54,956 KB
testcase_08 AC 158 ms
55,096 KB
testcase_09 AC 148 ms
54,268 KB
testcase_10 AC 157 ms
54,760 KB
testcase_11 AC 158 ms
54,996 KB
testcase_12 AC 158 ms
54,948 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();
	    	if (char_array[0] != 'a') {
	    		System.out.println("ato" + char_array[0]);
	    	}else {
	    	for (int i = 1; i < 26; i ++) {
	    		if (char_array[i] != char_array[i - 1] + 1) {
	    			System.out.println((char)(char_array[i - 1] + 1) +"to" + char_array[i]);
	    			break;
	    		}
	    	}}



	    	}

}
0