結果

問題 No.739 大事なことなので2度言います
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-10-06 15:33:28
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 322 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 11,069 ms
コンパイル使用メモリ 431,892 KB
実行使用メモリ 56,940 KB
最終ジャッジ日時 2024-04-30 19:23:13
合計ジャッジ時間 14,881 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 300 ms
56,824 KB
testcase_01 AC 301 ms
56,940 KB
testcase_02 AC 288 ms
54,252 KB
testcase_03 AC 322 ms
56,816 KB
testcase_04 AC 279 ms
54,172 KB
testcase_05 AC 304 ms
56,872 KB
testcase_06 AC 301 ms
56,812 KB
testcase_07 AC 286 ms
54,012 KB
testcase_08 AC 280 ms
54,136 KB
testcase_09 AC 300 ms
56,928 KB
testcase_10 AC 300 ms
56,800 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:13:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

val S = readLine()!!

fun judge(S: String): Boolean {
    val n = S.length
    val m = n / 2

    if (n % 2 != 0 || S.slice(0 until m) != S.slice(m until n)) {
        return false
    }
    return true
}

fun main(args: Array<String>) {
    println(if (judge(S)) "YES" else "NO")
}
0