結果

問題 No.138 化石のバージョン
ユーザー komkomh
提出日時 2019-06-07 12:58:31
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 325 ms / 5,000 ms
コード長 426 bytes
コンパイル時間 11,699 ms
コンパイル使用メモリ 433,228 KB
実行使用メモリ 51,984 KB
最終ジャッジ日時 2024-11-20 18:49:21
合計ジャッジ時間 24,696 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder

fun main() {
    val kasekiVersion = readLine()!!.split(".").map(String::toInt)
    val checkVersion = readLine()!!.split(".").map(String::toInt)

    for (i in 0 until 3) {
        if (checkVersion[i] < kasekiVersion[i]) {
            println("YES")
            return
        } else if (checkVersion[i] > kasekiVersion[i]){
            println("NO")
            return
        }
    }
    println("YES")
}
0