結果

問題 No.44 DPなすごろく
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-11-28 15:38:45
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 11,757 ms
コンパイル使用メモリ 430,776 KB
実行使用メモリ 49,776 KB
最終ジャッジ日時 2024-04-29 07:22:34
合計ジャッジ時間 19,241 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 288 ms
49,560 KB
testcase_01 AC 287 ms
49,560 KB
testcase_02 AC 285 ms
49,472 KB
testcase_03 AC 287 ms
49,564 KB
testcase_04 AC 288 ms
49,500 KB
testcase_05 AC 286 ms
49,540 KB
testcase_06 AC 287 ms
49,620 KB
testcase_07 AC 289 ms
49,716 KB
testcase_08 AC 290 ms
49,652 KB
testcase_09 AC 289 ms
49,560 KB
testcase_10 AC 288 ms
49,768 KB
testcase_11 AC 292 ms
49,584 KB
testcase_12 AC 288 ms
49,644 KB
testcase_13 AC 289 ms
49,504 KB
testcase_14 AC 288 ms
49,576 KB
testcase_15 AC 291 ms
49,688 KB
testcase_16 AC 288 ms
49,456 KB
testcase_17 AC 287 ms
49,776 KB
testcase_18 AC 290 ms
49,760 KB
testcase_19 AC 289 ms
49,528 KB
testcase_20 AC 287 ms
49,652 KB
testcase_21 AC 292 ms
49,456 KB
testcase_22 AC 293 ms
49,644 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