結果

問題 No.739 大事なことなので2度言います
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-02-19 18:25:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 1,949 ms
コンパイル使用メモリ 75,268 KB
実行使用メモリ 41,388 KB
最終ジャッジ日時 2024-04-20 17:30:42
合計ジャッジ時間 3,720 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
41,388 KB
testcase_01 AC 98 ms
40,116 KB
testcase_02 AC 109 ms
41,384 KB
testcase_03 AC 100 ms
40,092 KB
testcase_04 AC 114 ms
41,104 KB
testcase_05 AC 112 ms
40,080 KB
testcase_06 AC 103 ms
41,260 KB
testcase_07 AC 102 ms
40,936 KB
testcase_08 AC 105 ms
41,148 KB
testcase_09 AC 109 ms
40,128 KB
testcase_10 AC 105 ms
39,856 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