結果

問題 No.739 大事なことなので2度言います
ユーザー NewbiekunNewbiekun
提出日時 2019-02-20 16:00:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 3,463 ms
コンパイル使用メモリ 74,500 KB
実行使用メモリ 41,388 KB
最終ジャッジ日時 2024-04-24 14:39:50
合計ジャッジ時間 4,713 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
40,804 KB
testcase_01 AC 97 ms
40,280 KB
testcase_02 AC 105 ms
41,080 KB
testcase_03 AC 94 ms
40,008 KB
testcase_04 AC 106 ms
40,992 KB
testcase_05 AC 105 ms
40,916 KB
testcase_06 AC 96 ms
39,972 KB
testcase_07 AC 107 ms
41,020 KB
testcase_08 AC 109 ms
41,388 KB
testcase_09 AC 108 ms
40,980 KB
testcase_10 AC 110 ms
41,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No739
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int l = s.length();

		String ans = "";
		String h = s.substring( 0, l/2 );
		String r = s.substring( l/2, l );

// 文字列の比較にはequalsメソッドを使う
		if( h.equals(r) ){ ans = "YES"; }
		else{ ans = "NO"; }

		System.out.println( ans );
	}
}
0