結果

問題 No.780 オフ会
ユーザー hirohiro
提出日時 2019-02-18 00:24:22
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 10,655 ms
コンパイル使用メモリ 428,788 KB
実行使用メモリ 56,912 KB
最終ジャッジ日時 2024-04-30 19:55:39
合計ジャッジ時間 15,745 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 253 ms
56,844 KB
testcase_01 AC 252 ms
56,836 KB
testcase_02 AC 262 ms
56,608 KB
testcase_03 AC 255 ms
56,800 KB
testcase_04 AC 250 ms
56,844 KB
testcase_05 AC 258 ms
56,744 KB
testcase_06 AC 268 ms
56,824 KB
testcase_07 AC 252 ms
56,788 KB
testcase_08 AC 274 ms
56,832 KB
testcase_09 AC 255 ms
56,912 KB
testcase_10 AC 267 ms
56,888 KB
testcase_11 AC 263 ms
56,824 KB
testcase_12 AC 252 ms
56,832 KB
testcase_13 AC 257 ms
56,756 KB
testcase_14 AC 269 ms
56,764 KB
testcase_15 AC 264 ms
56,756 KB
testcase_16 AC 315 ms
56,740 KB
testcase_17 AC 261 ms
56,900 KB
testcase_18 AC 259 ms
56,844 KB
testcase_19 AC 255 ms
56,584 KB
testcase_20 AC 297 ms
56,888 KB
testcase_21 AC 262 ms
56,752 KB
testcase_22 AC 259 ms
56,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main(){
    val AB = readLine()!!.split(" ")
    val A = AB[0].toInt()
    val B = AB[1].toInt()
    println(if(A + 1 == B){
        println("YES")
        0
    } else if(A + 1 > B){
        println("NO")
        A + 1 - B
    } else {
        println("YES")
        B - A - 1
    })
}
0