結果

問題 No.780 オフ会
ユーザー hirohiro
提出日時 2019-02-18 00:19:58
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 8,882 ms
コンパイル使用メモリ 426,924 KB
実行使用メモリ 57,044 KB
最終ジャッジ日時 2024-04-30 19:55:16
合計ジャッジ時間 16,156 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 269 ms
56,876 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 262 ms
56,868 KB
testcase_05 AC 262 ms
56,736 KB
testcase_06 WA -
testcase_07 AC 274 ms
56,828 KB
testcase_08 AC 267 ms
56,784 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 264 ms
56,804 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 261 ms
56,832 KB
testcase_15 AC 254 ms
56,880 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 260 ms
56,788 KB
testcase_19 WA -
testcase_20 AC 265 ms
56,896 KB
testcase_21 AC 274 ms
56,860 KB
testcase_22 AC 263 ms
56,732 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 - B
    } else {
        println("YES")
        B - A - 1
    })
}
0