結果

問題 No.739 大事なことなので2度言います
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-02-19 18:25:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 2,750 ms
コンパイル使用メモリ 70,796 KB
実行使用メモリ 56,216 KB
最終ジャッジ日時 2023-08-02 17:23:12
合計ジャッジ時間 4,822 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,764 KB
testcase_01 AC 119 ms
55,408 KB
testcase_02 AC 118 ms
55,528 KB
testcase_03 AC 120 ms
55,696 KB
testcase_04 AC 118 ms
55,588 KB
testcase_05 AC 121 ms
55,496 KB
testcase_06 AC 120 ms
55,988 KB
testcase_07 AC 119 ms
55,600 KB
testcase_08 AC 117 ms
55,616 KB
testcase_09 AC 119 ms
55,496 KB
testcase_10 AC 116 ms
56,216 KB
権限があれば一括ダウンロードができます

ソースコード

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