結果

問題 No.739 大事なことなので2度言います
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-10-06 15:16:43
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 11,004 ms
コンパイル使用メモリ 433,292 KB
実行使用メモリ 54,332 KB
最終ジャッジ日時 2024-04-30 19:21:44
合計ジャッジ時間 13,170 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 244 ms
54,180 KB
testcase_01 AC 244 ms
54,268 KB
testcase_02 AC 244 ms
54,264 KB
testcase_03 AC 246 ms
54,228 KB
testcase_04 AC 246 ms
54,036 KB
testcase_05 AC 243 ms
54,320 KB
testcase_06 AC 248 ms
54,272 KB
testcase_07 AC 256 ms
54,256 KB
testcase_08 AC 262 ms
54,332 KB
testcase_09 AC 251 ms
54,324 KB
testcase_10 AC 248 ms
54,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:12:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

val S = readLine()!!

fun judge(S: String): Boolean {
    if (S.length % 2 != 0) return false

    for (i in 0 until S.length / 2) {
        if (S[i] != S[i + S.length / 2]) return false
    }
    return true
}

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