結果

問題 No.44 DPなすごろく
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-11-28 15:38:45
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 12,358 ms
コンパイル使用メモリ 408,908 KB
実行使用メモリ 50,656 KB
最終ジャッジ日時 2023-08-11 15:13:21
合計ジャッジ時間 19,709 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 276 ms
50,232 KB
testcase_01 AC 277 ms
50,328 KB
testcase_02 AC 280 ms
50,156 KB
testcase_03 AC 282 ms
50,328 KB
testcase_04 AC 281 ms
50,236 KB
testcase_05 AC 275 ms
50,232 KB
testcase_06 AC 272 ms
50,224 KB
testcase_07 AC 270 ms
50,144 KB
testcase_08 AC 274 ms
50,276 KB
testcase_09 AC 269 ms
50,484 KB
testcase_10 AC 271 ms
50,428 KB
testcase_11 AC 268 ms
50,216 KB
testcase_12 AC 271 ms
50,164 KB
testcase_13 AC 270 ms
50,656 KB
testcase_14 AC 265 ms
50,044 KB
testcase_15 AC 276 ms
50,136 KB
testcase_16 AC 267 ms
50,456 KB
testcase_17 AC 267 ms
50,460 KB
testcase_18 AC 267 ms
50,264 KB
testcase_19 AC 271 ms
50,288 KB
testcase_20 AC 271 ms
50,128 KB
testcase_21 AC 268 ms
50,480 KB
testcase_22 AC 271 ms
50,160 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

// フィボナッチ数!!
fun main() {
    val dp = IntArray(60)
    dp[1] = 1
    for (i in 2..59) {
        dp[i] = dp[i-2] + dp[i-1]
    }
    println(dp[(readLine()!!.toLong()+1).toInt()])
}
0