結果

問題 No.739 大事なことなので2度言います
ユーザー YamaKasaYamaKasa
提出日時 2018-10-05 21:26:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 2,856 ms
コンパイル使用メモリ 74,736 KB
実行使用メモリ 54,200 KB
最終ジャッジ日時 2024-04-30 19:04:15
合計ジャッジ時間 3,994 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
52,936 KB
testcase_01 AC 97 ms
52,640 KB
testcase_02 AC 107 ms
54,200 KB
testcase_03 AC 107 ms
54,048 KB
testcase_04 AC 95 ms
52,888 KB
testcase_05 AC 107 ms
54,068 KB
testcase_06 AC 114 ms
54,064 KB
testcase_07 AC 121 ms
53,980 KB
testcase_08 AC 114 ms
53,856 KB
testcase_09 AC 97 ms
52,536 KB
testcase_10 AC 108 ms
53,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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