結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー karayuukarayuu
提出日時 2018-11-23 09:30:14
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 10,762 ms
コンパイル使用メモリ 408,996 KB
実行使用メモリ 50,464 KB
最終ジャッジ日時 2023-08-13 00:58:03
合計ジャッジ時間 17,992 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 252 ms
50,256 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 254 ms
50,308 KB
testcase_04 AC 252 ms
50,232 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 252 ms
50,140 KB
testcase_08 AC 251 ms
50,232 KB
testcase_09 AC 261 ms
50,208 KB
testcase_10 AC 253 ms
50,180 KB
testcase_11 AC 251 ms
50,400 KB
testcase_12 AC 250 ms
50,264 KB
testcase_13 AC 255 ms
50,296 KB
testcase_14 AC 259 ms
50,220 KB
testcase_15 AC 252 ms
50,212 KB
testcase_16 AC 257 ms
50,188 KB
testcase_17 AC 260 ms
50,172 KB
testcase_18 AC 262 ms
50,300 KB
testcase_19 AC 256 ms
50,296 KB
testcase_20 AC 258 ms
50,464 KB
testcase_21 AC 254 ms
50,440 KB
testcase_22 AC 252 ms
50,132 KB
testcase_23 AC 257 ms
50,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

/**
 * Created by karayuu on 2018/11/23
 */
fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    var d = 1
    var count = 0

    while (d <= n) {
        d = d.double()
        count++
    }

    println(count)
}

fun Int.double() = this * 2
0