結果

問題 No.138 化石のバージョン
ユーザー javyjavy
提出日時 2015-11-28 00:41:24
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 317 ms / 5,000 ms
コード長 1,026 bytes
コンパイル時間 12,115 ms
コンパイル使用メモリ 438,768 KB
実行使用メモリ 56,972 KB
最終ジャッジ日時 2024-04-30 09:56:22
合計ジャッジ時間 24,095 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 310 ms
56,916 KB
testcase_01 AC 310 ms
56,820 KB
testcase_02 AC 311 ms
56,972 KB
testcase_03 AC 312 ms
56,828 KB
testcase_04 AC 317 ms
56,860 KB
testcase_05 AC 314 ms
56,956 KB
testcase_06 AC 312 ms
56,812 KB
testcase_07 AC 310 ms
56,924 KB
testcase_08 AC 310 ms
56,812 KB
testcase_09 AC 307 ms
56,824 KB
testcase_10 AC 311 ms
56,916 KB
testcase_11 AC 311 ms
56,960 KB
testcase_12 AC 306 ms
56,844 KB
testcase_13 AC 308 ms
56,820 KB
testcase_14 AC 311 ms
56,828 KB
testcase_15 AC 304 ms
56,820 KB
testcase_16 AC 309 ms
56,812 KB
testcase_17 AC 305 ms
56,820 KB
testcase_18 AC 307 ms
56,816 KB
testcase_19 AC 307 ms
56,828 KB
testcase_20 AC 309 ms
56,844 KB
testcase_21 AC 309 ms
56,808 KB
testcase_22 AC 311 ms
56,852 KB
testcase_23 AC 311 ms
56,892 KB
testcase_24 AC 309 ms
56,916 KB
testcase_25 AC 309 ms
56,928 KB
testcase_26 AC 311 ms
56,908 KB
testcase_27 AC 307 ms
56,912 KB
testcase_28 AC 310 ms
56,820 KB
testcase_29 AC 306 ms
56,864 KB
testcase_30 AC 309 ms
56,908 KB
testcase_31 AC 309 ms
56,948 KB
testcase_32 AC 312 ms
56,852 KB
testcase_33 AC 307 ms
56,824 KB
testcase_34 AC 309 ms
56,920 KB
testcase_35 AC 310 ms
56,860 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/12.
 */
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()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(".")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    val baseVersion = readLineIntArray()
    val calcVersion = readLineIntArray()
    readLine()
    for (i in 0..2) {
        if (baseVersion[i] < calcVersion[i]) {
            println("NO")
            return
        } else if (baseVersion[i] > calcVersion[i]) {
            println("YES")
            return
        }
    }
    println("YES")
}
0