結果

問題 No.1217 せしすせそ
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-02-06 20:13:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 703 bytes
コンパイル時間 4,565 ms
コンパイル使用メモリ 74,904 KB
実行使用メモリ 57,032 KB
最終ジャッジ日時 2023-09-16 06:36:37
合計ジャッジ時間 6,811 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 157 ms
56,896 KB
testcase_01 AC 155 ms
56,892 KB
testcase_02 AC 156 ms
57,032 KB
testcase_03 AC 153 ms
56,964 KB
testcase_04 AC 156 ms
56,796 KB
testcase_05 AC 153 ms
56,736 KB
testcase_06 AC 151 ms
56,796 KB
testcase_07 AC 153 ms
56,936 KB
testcase_08 AC 156 ms
56,832 KB
testcase_09 AC 156 ms
56,892 KB
testcase_10 AC 154 ms
56,740 KB
testcase_11 AC 155 ms
56,832 KB
testcase_12 AC 155 ms
56,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

// https://yukicoder.me/problems/no/1217
public class Seshisuseso1217 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);
    String base = "abcdefghijklmnopqrstuvwxyz";
    String replaced = sc.next();
    List<String> baseList = Arrays.asList(base.split(""));
    List<String> replacedList = Arrays.asList(replaced.split(""));

    for (int i = 0; i < base.length(); i++) {
      if (!baseList.get(i).equals(replacedList.get(i))) {
        System.out.println(baseList.get(i) + "to" + replacedList.get(i));
        return;
      }
    }
  }
}
0