結果
問題 | No.658 テトラナッチ数列 Hard |
ユーザー | 💕💖💞 |
提出日時 | 2018-03-07 10:46:04 |
言語 | Kotlin (1.9.23) |
結果 |
RE
|
実行時間 | - |
コード長 | 378 bytes |
コンパイル時間 | 12,484 ms |
コンパイル使用メモリ | 431,860 KB |
実行使用メモリ | 75,872 KB |
最終ジャッジ日時 | 2024-04-30 17:05:57 |
合計ジャッジ時間 | 17,890 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 374 ms
69,196 KB |
testcase_01 | AC | 378 ms
69,072 KB |
testcase_02 | RE | - |
testcase_03 | AC | 375 ms
69,060 KB |
testcase_04 | AC | 612 ms
75,872 KB |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used fun main(args:Array<String>) { ^
ソースコード
fun main(args:Array<String>) { val n = readLine()!!.toInt() val base = mutableListOf( 0, 0, 0, 1 ) for( i in (4..1000_000) ) { val next = (base[i-4] + base[i-3] + base[i-2] + base[i-1])%17 base.add(next) } (1..n).map { // 4912のサイクルの周期性がある val t = (readLine()!!.toLong() -1L % 4912).toInt() base[t] }.map { println(it) } }