結果

問題 No.739 大事なことなので2度言います
ユーザー kohaku_kohaku
提出日時 2019-02-19 18:25:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 2,180 ms
コンパイル使用メモリ 77,540 KB
実行使用メモリ 54,284 KB
最終ジャッジ日時 2024-10-12 13:27:14
合計ジャッジ時間 4,334 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(judge(s)) {
            System.out.println("YES");
        } else{
            System.out.println("NO");
        }
    }
    
    static boolean judge(String s) {
        String str = s.substring(0, s.length()/2);
        s = s.replace(str, "");
        if(s.equals("")) {
            return true;
        }
        return false;
    }
}
0