結果
問題 | No.739 大事なことなので2度言います |
ユーザー | YamaKasa |
提出日時 | 2018-10-05 21:26:18 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 2,000 ms |
コード長 | 425 bytes |
コンパイル時間 | 2,466 ms |
コンパイル使用メモリ | 74,600 KB |
実行使用メモリ | 54,624 KB |
最終ジャッジ日時 | 2024-11-20 16:35:09 |
合計ジャッジ時間 | 4,586 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 7 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); scan.close(); if(S.length() % 2 != 0) { System.out.println("NO"); }else { int l = S.length(); String s = S.substring(0, l / 2); if(s.equals(S.substring(l / 2, l))) { System.out.println("YES"); }else { System.out.println("NO"); } } } }