結果

問題 No.648  お や す み 
ユーザー takayuki-ochiaitakayuki-ochiai
提出日時 2020-02-21 00:34:14
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 12,761 ms
コンパイル使用メモリ 434,332 KB
実行使用メモリ 50,808 KB
最終ジャッジ日時 2024-04-17 06:35:29
合計ジャッジ時間 35,863 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 276 ms
49,752 KB
testcase_02 WA -
testcase_03 AC 273 ms
49,876 KB
testcase_04 AC 270 ms
49,752 KB
testcase_05 WA -
testcase_06 AC 276 ms
49,860 KB
testcase_07 AC 274 ms
49,768 KB
testcase_08 AC 276 ms
49,760 KB
testcase_09 WA -
testcase_10 AC 277 ms
49,864 KB
testcase_11 AC 277 ms
49,660 KB
testcase_12 AC 273 ms
49,780 KB
testcase_13 AC 283 ms
49,656 KB
testcase_14 AC 278 ms
49,756 KB
testcase_15 AC 281 ms
49,960 KB
testcase_16 AC 275 ms
49,948 KB
testcase_17 AC 277 ms
49,900 KB
testcase_18 AC 275 ms
49,896 KB
testcase_19 AC 282 ms
49,696 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 296 ms
50,400 KB
testcase_31 AC 295 ms
50,452 KB
testcase_32 AC 277 ms
50,260 KB
testcase_33 AC 283 ms
50,660 KB
testcase_34 AC 279 ms
50,428 KB
testcase_35 AC 278 ms
50,116 KB
testcase_36 AC 276 ms
50,000 KB
testcase_37 AC 281 ms
50,684 KB
testcase_38 AC 277 ms
50,312 KB
testcase_39 AC 282 ms
50,256 KB
testcase_40 AC 283 ms
50,808 KB
testcase_41 AC 280 ms
50,624 KB
testcase_42 AC 288 ms
50,584 KB
testcase_43 AC 280 ms
50,476 KB
testcase_44 AC 274 ms
50,008 KB
testcase_45 AC 283 ms
50,688 KB
testcase_46 AC 278 ms
50,048 KB
testcase_47 AC 277 ms
50,412 KB
testcase_48 AC 276 ms
50,380 KB
testcase_49 AC 283 ms
50,720 KB
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 RE -
testcase_56 RE -
testcase_57 RE -
testcase_58 RE -
testcase_59 RE -
testcase_60 RE -
testcase_61 RE -
testcase_62 RE -
testcase_63 RE -
testcase_64 RE -
testcase_65 RE -
testcase_66 RE -
testcase_67 RE -
testcase_68 RE -
testcase_69 RE -
testcase_70 RE -
testcase_71 RE -
testcase_72 RE -
testcase_73 RE -
testcase_74 RE -
testcase_75 RE -
testcase_76 RE -
testcase_77 RE -
testcase_78 RE -
testcase_79 RE -
testcase_80 RE -
testcase_81 RE -
testcase_82 WA -
testcase_83 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val sheepNumber = readLine()?.toInt()

    var i = 1
    sheepNumber?.let {
        var restSheepNumber = sheepNumber
        while (restSheepNumber > 0) {
            restSheepNumber -= i
            i++
        }

        if (restSheepNumber == 0) {
            println("YES")
        } else {
            println("NO")
        }
    }
}
0