結果

問題 No.739 大事なことなので2度言います
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-05 21:28:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 2,706 ms
コンパイル使用メモリ 74,408 KB
実行使用メモリ 54,088 KB
最終ジャッジ日時 2024-04-30 19:08:13
合計ジャッジ時間 4,199 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
54,064 KB
testcase_01 AC 108 ms
53,896 KB
testcase_02 AC 109 ms
53,980 KB
testcase_03 AC 106 ms
53,932 KB
testcase_04 AC 98 ms
52,928 KB
testcase_05 AC 112 ms
54,064 KB
testcase_06 AC 97 ms
52,648 KB
testcase_07 AC 110 ms
54,028 KB
testcase_08 AC 108 ms
53,948 KB
testcase_09 AC 104 ms
54,088 KB
testcase_10 AC 105 ms
53,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		String s=scanner.next();
		
		for(int i=1;i<=s.length();i++) {
			String s1=s.substring(0,i);
			String s2=s.substring(i,s.length());
			if(s1.equals(s2)) {
				System.out.println("YES");
				return;
			}
		}
		System.out.println("NO");
	}
}
0