結果

問題 No.739 大事なことなので2度言います
ユーザー GrenacheGrenache
提出日時 2019-04-26 16:38:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 735 bytes
コンパイル時間 4,700 ms
コンパイル使用メモリ 72,180 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2023-08-16 05:01:16
合計ジャッジ時間 7,070 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,840 KB
testcase_01 AC 119 ms
55,620 KB
testcase_02 AC 117 ms
55,564 KB
testcase_03 AC 119 ms
55,852 KB
testcase_04 AC 118 ms
55,760 KB
testcase_05 AC 117 ms
55,600 KB
testcase_06 AC 117 ms
56,032 KB
testcase_07 AC 117 ms
55,660 KB
testcase_08 AC 116 ms
55,776 KB
testcase_09 AC 117 ms
53,392 KB
testcase_10 AC 116 ms
55,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder739 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();
		int n = s.length;

		if (n % 2 != 0) {
			pr.println("NO");
		} else {
			for (int i = 0; i < n / 2; i++) {
				if (s[i] != s[n / 2 + i]) {
					pr.println("NO");
					return;
				}
			}
			pr.println("YES");
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0