結果

問題 No.739 大事なことなので2度言います
ユーザー Mcpu3Mcpu3
提出日時 2018-10-06 00:07:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 571 bytes
コンパイル時間 2,383 ms
コンパイル使用メモリ 74,840 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-04-30 19:19:10
合計ジャッジ時間 4,464 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
53,952 KB
testcase_01 AC 128 ms
54,116 KB
testcase_02 AC 126 ms
54,252 KB
testcase_03 AC 129 ms
54,164 KB
testcase_04 AC 127 ms
54,120 KB
testcase_05 AC 128 ms
54,012 KB
testcase_06 AC 129 ms
54,260 KB
testcase_07 AC 130 ms
53,992 KB
testcase_08 AC 126 ms
54,008 KB
testcase_09 AC 125 ms
54,080 KB
testcase_10 AC 127 ms
54,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char S[] = new char[21];
        S = sc.next().toCharArray();
        sc.close();
        int length = S.length, i;
        if (length % 2 == 1) System.out.print("NO");
        else {
            for (i = 0; i < length / 2; ++i) {
                if (S[i] != S[length / 2 + i]) break;
            }
            if (i == length / 2) System.out.print("YES");
            else System.out.print("NO");
        }
    }
}
0