結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー uchida_tuchida_t
提出日時 2023-06-22 13:00:38
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 334 ms / 5,000 ms
コード長 239 bytes
コンパイル時間 10,050 ms
コンパイル使用メモリ 412,132 KB
実行使用メモリ 50,692 KB
最終ジャッジ日時 2023-09-12 07:36:41
合計ジャッジ時間 18,016 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 265 ms
50,420 KB
testcase_01 AC 259 ms
50,224 KB
testcase_02 AC 257 ms
50,268 KB
testcase_03 AC 260 ms
50,692 KB
testcase_04 AC 265 ms
50,084 KB
testcase_05 AC 262 ms
50,136 KB
testcase_06 AC 261 ms
50,224 KB
testcase_07 AC 334 ms
50,300 KB
testcase_08 AC 265 ms
50,192 KB
testcase_09 AC 265 ms
50,400 KB
testcase_10 AC 268 ms
50,296 KB
testcase_11 AC 262 ms
50,208 KB
testcase_12 AC 264 ms
50,336 KB
testcase_13 AC 266 ms
50,348 KB
testcase_14 AC 262 ms
50,244 KB
testcase_15 AC 262 ms
50,208 KB
testcase_16 AC 263 ms
50,336 KB
testcase_17 AC 262 ms
50,164 KB
testcase_18 AC 260 ms
50,112 KB
testcase_19 AC 258 ms
50,200 KB
testcase_20 AC 263 ms
50,328 KB
testcase_21 AC 262 ms
50,336 KB
testcase_22 AC 263 ms
50,204 KB
testcase_23 AC 265 ms
50,340 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
    val wantBiscuit = readLine()!!.toInt()
    var numOfBiscuit = 1
    var numOfClap = 0
    while (numOfBiscuit < wantBiscuit) {
        numOfBiscuit *= 2
        numOfClap++
    }
    println(numOfClap)
}
0