結果

問題 No.739 大事なことなので2度言います
ユーザー yukiyuki
提出日時 2020-08-18 09:58:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 2,937 ms
コンパイル使用メモリ 74,068 KB
実行使用メモリ 41,628 KB
最終ジャッジ日時 2024-04-20 05:25:24
合計ジャッジ時間 4,113 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
41,484 KB
testcase_01 AC 126 ms
41,240 KB
testcase_02 AC 124 ms
41,232 KB
testcase_03 AC 125 ms
41,212 KB
testcase_04 AC 124 ms
41,152 KB
testcase_05 AC 125 ms
41,216 KB
testcase_06 AC 124 ms
41,084 KB
testcase_07 AC 127 ms
41,628 KB
testcase_08 AC 128 ms
40,924 KB
testcase_09 AC 128 ms
40,932 KB
testcase_10 AC 125 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.Scanner;

public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		String N = in.next();
        String w1 = N.substring(0, N.length()/2 );
        String w2 = N.substring(N.length()/2);
        
        if(N.length() % 2 != 0){
    		System.out.println("NO");
        }else if(w1.equals(w2)){
    		System.out.println("YES");            
        }else{
    		System.out.println("NO");
        }
   }

}
0