結果

問題 No.739 大事なことなので2度言います
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-01-16 21:57:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 515 bytes
コンパイル時間 3,192 ms
コンパイル使用メモリ 72,688 KB
実行使用メモリ 56,256 KB
最終ジャッジ日時 2023-08-18 20:42:21
合計ジャッジ時間 5,519 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
54,196 KB
testcase_01 AC 117 ms
56,156 KB
testcase_02 AC 117 ms
55,432 KB
testcase_03 AC 114 ms
56,012 KB
testcase_04 AC 112 ms
56,040 KB
testcase_05 AC 113 ms
55,752 KB
testcase_06 AC 120 ms
55,660 KB
testcase_07 AC 118 ms
56,256 KB
testcase_08 AC 115 ms
53,920 KB
testcase_09 AC 118 ms
56,044 KB
testcase_10 AC 115 ms
55,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// https://yukicoder.me/problems/no/739
public class TwoTimes739 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    // String 1つ分を読み込む
    String s = sc.next();
    String s1 = s.substring(0, s.length() / 2);
    String s2 = s.substring(s.length() / 2, s.length());

    if (s1.equals(s2)) {
      System.out.println("YES");
    } else {
      System.out.println("NO");
    }
  }
}
0