結果

問題 No.2322 MMA文字列
ユーザー gemmarogemmaro
提出日時 2023-07-05 08:32:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 4,926 ms
コンパイル使用メモリ 71,616 KB
実行使用メモリ 56,188 KB
最終ジャッジ日時 2023-09-26 07:45:13
合計ジャッジ時間 6,847 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,472 KB
testcase_01 AC 119 ms
55,960 KB
testcase_02 AC 120 ms
55,628 KB
testcase_03 AC 121 ms
55,620 KB
testcase_04 AC 122 ms
55,828 KB
testcase_05 AC 118 ms
55,572 KB
testcase_06 AC 121 ms
55,280 KB
testcase_07 AC 122 ms
55,988 KB
testcase_08 AC 120 ms
55,580 KB
testcase_09 AC 118 ms
56,032 KB
testcase_10 AC 119 ms
55,756 KB
testcase_11 AC 118 ms
55,680 KB
testcase_12 AC 121 ms
55,332 KB
testcase_13 AC 120 ms
55,512 KB
testcase_14 AC 120 ms
55,772 KB
testcase_15 AC 120 ms
56,188 KB
testcase_16 AC 119 ms
55,624 KB
testcase_17 AC 123 ms
55,664 KB
testcase_18 AC 125 ms
55,628 KB
testcase_19 AC 123 ms
55,612 KB
testcase_20 AC 123 ms
55,648 KB
testcase_21 AC 122 ms
55,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        char[] chars = scanner.next().toCharArray();
        scanner.close();
        if (chars[0] == chars[1] && chars[1] != chars[2]) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
0