結果

問題 No.739 大事なことなので2度言います
ユーザー N.Matsumoto
提出日時 2019-09-22 09:11:41
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 2,332 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 41,408 KB
最終ジャッジ日時 2024-09-19 03:25:58
合計ジャッジ時間 4,258 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 4 WA * 3
権限があれば一括ダウンロードができます

ソースコード

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 + 1))) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
0