結果

問題 No.998 Four Integers
ユーザー 👑 箱星箱星
提出日時 2020-02-28 21:21:32
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 332 ms / 1,000 ms
コード長 218 bytes
コンパイル時間 14,671 ms
コンパイル使用メモリ 434,600 KB
実行使用メモリ 55,128 KB
最終ジャッジ日時 2024-05-08 01:27:44
合計ジャッジ時間 20,120 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 323 ms
54,836 KB
testcase_01 AC 325 ms
55,000 KB
testcase_02 AC 320 ms
54,964 KB
testcase_03 AC 322 ms
54,792 KB
testcase_04 AC 324 ms
55,032 KB
testcase_05 AC 324 ms
55,016 KB
testcase_06 AC 324 ms
55,068 KB
testcase_07 AC 325 ms
55,128 KB
testcase_08 AC 319 ms
55,032 KB
testcase_09 AC 323 ms
54,940 KB
testcase_10 AC 332 ms
55,072 KB
testcase_11 AC 328 ms
54,792 KB
testcase_12 AC 322 ms
55,112 KB
testcase_13 AC 321 ms
55,028 KB
testcase_14 AC 325 ms
55,068 KB
testcase_15 AC 322 ms
55,104 KB
testcase_16 AC 328 ms
54,972 KB
testcase_17 AC 322 ms
55,004 KB
testcase_18 AC 324 ms
54,960 KB
testcase_19 AC 332 ms
55,068 KB
testcase_20 AC 322 ms
54,964 KB
testcase_21 AC 322 ms
54,972 KB
testcase_22 AC 324 ms
55,064 KB
testcase_23 AC 322 ms
54,960 KB
testcase_24 AC 322 ms
54,816 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