結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー da_louisda_louis
提出日時 2020-02-07 01:14:38
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 292 ms / 5,000 ms
コード長 205 bytes
コンパイル時間 11,373 ms
コンパイル使用メモリ 423,384 KB
実行使用メモリ 51,832 KB
最終ジャッジ日時 2023-10-25 22:56:48
合計ジャッジ時間 17,313 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 273 ms
51,828 KB
testcase_01 AC 269 ms
51,828 KB
testcase_02 AC 268 ms
51,828 KB
testcase_03 AC 271 ms
51,824 KB
testcase_04 AC 270 ms
51,824 KB
testcase_05 AC 269 ms
51,828 KB
testcase_06 AC 283 ms
51,824 KB
testcase_07 AC 280 ms
51,820 KB
testcase_08 AC 292 ms
51,824 KB
testcase_09 AC 286 ms
51,816 KB
testcase_10 AC 274 ms
51,828 KB
testcase_11 AC 273 ms
51,824 KB
testcase_12 AC 271 ms
51,832 KB
testcase_13 AC 272 ms
51,828 KB
testcase_14 AC 272 ms
51,828 KB
testcase_15 AC 271 ms
51,824 KB
testcase_16 AC 269 ms
51,828 KB
testcase_17 AC 269 ms
51,828 KB
testcase_18 AC 269 ms
51,824 KB
testcase_19 AC 269 ms
51,824 KB
testcase_20 AC 269 ms
51,828 KB
testcase_21 AC 270 ms
51,828 KB
testcase_22 AC 267 ms
51,824 KB
testcase_23 AC 269 ms
51,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import kotlin.math.ceil
import kotlin.math.log2

fun main(args: Array<String>) {
    p89()
}

fun p89() {
    val n = readLine()!!.toDouble()

    val answer = ceil(log2(n)).toInt()

    println(answer)
}
0