結果

問題 No.739 大事なことなので2度言います
ユーザー GodNegotoGodNegoto
提出日時 2019-11-18 16:35:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 447 bytes
コンパイル時間 3,386 ms
コンパイル使用メモリ 74,704 KB
実行使用メモリ 54,256 KB
最終ジャッジ日時 2024-04-09 20:17:50
合計ジャッジ時間 4,830 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
52,996 KB
testcase_01 AC 115 ms
53,888 KB
testcase_02 AC 112 ms
54,120 KB
testcase_03 AC 111 ms
54,192 KB
testcase_04 AC 110 ms
53,840 KB
testcase_05 AC 109 ms
54,024 KB
testcase_06 AC 104 ms
53,440 KB
testcase_07 AC 106 ms
53,508 KB
testcase_08 AC 103 ms
53,028 KB
testcase_09 AC 115 ms
54,256 KB
testcase_10 AC 111 ms
53,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.Scanner;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(S.length() % 2 == 1) {
			System.out.println("NO");
		}
		else {
			String ss = S.substring(S.length() / 2);
			String sss = S.substring(0, S.length() / 2);
			if(sss.equals(ss)) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		}
	}
}
0