結果

問題 No.998 Four Integers
ユーザー 👑 箱
提出日時 2020-02-28 21:21:32
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 320 ms / 1,000 ms
コード長 218 bytes
コンパイル時間 14,258 ms
コンパイル使用メモリ 410,828 KB
実行使用メモリ 57,080 KB
最終ジャッジ日時 2023-08-20 19:01:17
合計ジャッジ時間 23,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 312 ms
56,652 KB
testcase_01 AC 312 ms
56,584 KB
testcase_02 AC 313 ms
57,000 KB
testcase_03 AC 312 ms
56,692 KB
testcase_04 AC 315 ms
56,732 KB
testcase_05 AC 317 ms
56,796 KB
testcase_06 AC 315 ms
57,000 KB
testcase_07 AC 315 ms
56,924 KB
testcase_08 AC 313 ms
56,912 KB
testcase_09 AC 313 ms
56,460 KB
testcase_10 AC 320 ms
56,788 KB
testcase_11 AC 317 ms
56,664 KB
testcase_12 AC 312 ms
56,656 KB
testcase_13 AC 316 ms
56,836 KB
testcase_14 AC 314 ms
56,928 KB
testcase_15 AC 311 ms
57,080 KB
testcase_16 AC 317 ms
56,588 KB
testcase_17 AC 313 ms
56,840 KB
testcase_18 AC 313 ms
56,920 KB
testcase_19 AC 313 ms
56,664 KB
testcase_20 AC 317 ms
56,904 KB
testcase_21 AC 316 ms
56,896 KB
testcase_22 AC 320 ms
56,908 KB
testcase_23 AC 312 ms
56,876 KB
testcase_24 AC 309 ms
56,592 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.*

fun main(args: Array<String>) {
    var a = readLine()!!.split(' ').map { it.toInt() }
    a = a.sorted()
    println(if (a[1] == a[0] + 1 && a[2] == a[1] + 1 && a[3] == a[2] + 1) "Yes" else "No")
}
0