結果
問題 |
No.739 大事なことなので2度言います
|
ユーザー |
|
提出日時 | 2019-09-22 09:05:47 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 2,180 ms |
コンパイル使用メモリ | 74,520 KB |
実行使用メモリ | 53,924 KB |
最終ジャッジ日時 | 2024-09-19 03:25:43 |
合計ジャッジ時間 | 4,377 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 WA * 1 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); if (!(str.length() % 2 == 0)) { System.out.println("NO"); } else if (str.substring(1, str.length() / 2).equals(str.substring(str.length() / 2 + 1))) { System.out.println("YES"); } else { System.out.println("NO"); } } }