結果

問題 No.1217 せしすせそ
ユーザー xRS43BofaUEZ5gc
提出日時 2021-03-03 10:05:31
言語 Java
(openjdk 23)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 551 bytes
コンパイル時間 3,474 ms
コンパイル使用メモリ 76,292 KB
実行使用メモリ 42,564 KB
最終ジャッジ日時 2024-10-03 03:08:56
合計ジャッジ時間 6,212 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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