結果

問題 No.739 大事なことなので2度言います
ユーザー fukafukatanifukafukatani
提出日時 2021-06-23 23:15:06
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,007 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 12,076 ms
コンパイル使用メモリ 244,008 KB
実行使用メモリ 63,356 KB
最終ジャッジ日時 2023-09-07 05:12:36
合計ジャッジ時間 20,895 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,007 ms
63,020 KB
testcase_01 AC 984 ms
62,840 KB
testcase_02 AC 981 ms
62,716 KB
testcase_03 AC 993 ms
62,996 KB
testcase_04 AC 974 ms
63,040 KB
testcase_05 AC 995 ms
62,980 KB
testcase_06 AC 985 ms
63,356 KB
testcase_07 AC 960 ms
62,588 KB
testcase_08 AC 956 ms
62,964 KB
testcase_09 AC 962 ms
63,092 KB
testcase_10 AC 961 ms
62,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val s = sc.next
  val hn = s.length / 2
  if (s.length % 2 == 0 && (0 until hn).forall(i => s(i) == s(i + hn))) {
    println("YES")
  } else {
    println("NO")
  }
}
0