結果

問題 No.138 化石のバージョン
ユーザー javyjavy
提出日時 2015-11-28 00:43:05
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 1,004 bytes
コンパイル時間 12,395 ms
コンパイル使用メモリ 438,360 KB
実行使用メモリ 57,072 KB
最終ジャッジ日時 2024-04-30 10:04:37
合計ジャッジ時間 24,375 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 309 ms
56,828 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 311 ms
56,836 KB
testcase_07 AC 306 ms
56,832 KB
testcase_08 AC 311 ms
56,944 KB
testcase_09 AC 314 ms
57,064 KB
testcase_10 AC 321 ms
56,908 KB
testcase_11 AC 315 ms
56,888 KB
testcase_12 AC 322 ms
56,816 KB
testcase_13 AC 328 ms
56,872 KB
testcase_14 AC 314 ms
56,860 KB
testcase_15 AC 312 ms
56,920 KB
testcase_16 AC 309 ms
56,936 KB
testcase_17 AC 315 ms
56,972 KB
testcase_18 AC 311 ms
56,856 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 313 ms
56,912 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 312 ms
56,908 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 313 ms
56,868 KB
testcase_34 AC 311 ms
56,900 KB
testcase_35 AC 314 ms
56,932 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 = baseVersion
    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