結果

問題 No.44 DPなすごろく
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-11-28 15:36:36
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 12,466 ms
コンパイル使用メモリ 409,388 KB
実行使用メモリ 52,216 KB
最終ジャッジ日時 2023-08-11 15:06:23
合計ジャッジ時間 20,385 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 270 ms
50,492 KB
testcase_01 AC 268 ms
50,136 KB
testcase_02 AC 269 ms
50,244 KB
testcase_03 AC 274 ms
50,272 KB
testcase_04 AC 275 ms
50,220 KB
testcase_05 AC 274 ms
50,280 KB
testcase_06 AC 270 ms
50,304 KB
testcase_07 AC 269 ms
50,188 KB
testcase_08 AC 274 ms
50,224 KB
testcase_09 AC 272 ms
50,276 KB
testcase_10 AC 271 ms
50,464 KB
testcase_11 AC 274 ms
50,212 KB
testcase_12 AC 274 ms
50,260 KB
testcase_13 AC 272 ms
52,216 KB
testcase_14 AC 271 ms
50,504 KB
testcase_15 AC 269 ms
50,308 KB
testcase_16 AC 269 ms
50,428 KB
testcase_17 AC 274 ms
50,260 KB
testcase_18 AC 275 ms
50,252 KB
testcase_19 AC 275 ms
50,276 KB
testcase_20 AC 276 ms
50,192 KB
testcase_21 AC 281 ms
50,188 KB
testcase_22 AC 276 ms
50,220 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()!!.toInt()+1])
}
0