結果

問題 No.739 大事なことなので2度言います
ユーザー N.MatsumotoN.Matsumoto
提出日時 2019-09-22 09:12:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 74,792 KB
実行使用メモリ 57,476 KB
最終ジャッジ日時 2023-10-19 07:06:31
合計ジャッジ時間 4,371 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,368 KB
testcase_01 AC 134 ms
57,208 KB
testcase_02 AC 134 ms
57,360 KB
testcase_03 AC 138 ms
57,212 KB
testcase_04 AC 136 ms
57,180 KB
testcase_05 AC 135 ms
57,336 KB
testcase_06 AC 131 ms
57,476 KB
testcase_07 AC 129 ms
57,284 KB
testcase_08 AC 128 ms
57,308 KB
testcase_09 AC 130 ms
57,404 KB
testcase_10 AC 130 ms
57,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        if (!(str.length() % 2 == 0)) {
            System.out.println("NO");
        } else if (str.substring(0, str.length() / 2).equals(str.substring(str.length() / 2))) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
0