結果

問題 No.44 DPなすごろく
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-11-28 15:36:36
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 11,064 ms
コンパイル使用メモリ 422,880 KB
実行使用メモリ 54,172 KB
最終ジャッジ日時 2024-04-29 07:16:55
合計ジャッジ時間 18,719 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 271 ms
49,656 KB
testcase_01 AC 275 ms
49,604 KB
testcase_02 AC 276 ms
49,512 KB
testcase_03 AC 274 ms
49,488 KB
testcase_04 AC 269 ms
49,496 KB
testcase_05 AC 278 ms
49,528 KB
testcase_06 AC 277 ms
49,668 KB
testcase_07 AC 268 ms
49,492 KB
testcase_08 AC 269 ms
49,780 KB
testcase_09 AC 262 ms
49,460 KB
testcase_10 AC 248 ms
49,732 KB
testcase_11 AC 278 ms
49,580 KB
testcase_12 AC 275 ms
49,588 KB
testcase_13 AC 278 ms
49,488 KB
testcase_14 AC 279 ms
49,420 KB
testcase_15 AC 270 ms
49,528 KB
testcase_16 AC 268 ms
49,548 KB
testcase_17 AC 271 ms
49,748 KB
testcase_18 AC 273 ms
49,776 KB
testcase_19 AC 268 ms
49,836 KB
testcase_20 AC 269 ms
49,492 KB
testcase_21 AC 277 ms
49,888 KB
testcase_22 AC 274 ms
49,864 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