結果

問題 No.69 文字を自由に並び替え
ユーザー javyjavy
提出日時 2015-12-01 10:22:49
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 282 ms / 5,000 ms
コード長 665 bytes
コンパイル時間 9,738 ms
コンパイル使用メモリ 438,572 KB
実行使用メモリ 57,816 KB
最終ジャッジ日時 2024-04-30 11:35:03
合計ジャッジ時間 14,553 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 259 ms
57,816 KB
testcase_01 AC 249 ms
57,624 KB
testcase_02 AC 282 ms
57,636 KB
testcase_03 AC 258 ms
57,588 KB
testcase_04 AC 255 ms
57,724 KB
testcase_05 AC 257 ms
57,580 KB
testcase_06 AC 260 ms
57,612 KB
testcase_07 AC 257 ms
57,556 KB
testcase_08 AC 265 ms
57,736 KB
testcase_09 AC 253 ms
57,648 KB
testcase_10 AC 259 ms
57,632 KB
testcase_11 AC 266 ms
57,732 KB
testcase_12 AC 263 ms
57,720 KB
testcase_13 AC 260 ms
57,768 KB
testcase_14 AC 268 ms
57,624 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/02.
 */
fun main(args: Array<String>) {
    fun readLineLongArray() : List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }
    fun readLineLong() : Long {
        val str = readLine() as String
        return str.toLong()
    }
    val str1 = (readLine() as String).toCharArray().sorted()
    val str2 = (readLine() as String).toCharArray().sorted()
    for (i in 0..(str1.size-1)) {
        if (str1[i] != str2[i]) {
            println("NO")
            return
        }
    }
    println("YES")

}

0