結果
問題 | No.314 ケンケンパ |
ユーザー |
![]() |
提出日時 | 2015-12-19 14:28:53 |
言語 | Haskell (9.10.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 4,432 ms |
コンパイル使用メモリ | 171,392 KB |
実行使用メモリ | 76,544 KB |
最終ジャッジ日時 | 2024-09-16 16:04:46 |
合計ジャッジ時間 | 8,733 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 16 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
m::Intm = 1000000007-- based on https://wiki.haskell.org/Memoizationkenkenpa::Int->Intkenkenpa = (!!) (map ken [1 ..]) . subtract 1whereken 1 = 1ken 2 = 2ken 3 = 2ken n = flip mod m $ kenkenpa (n - 3) + kenkenpa (n - 2)main::IO()main = print . kenkenpa =<< readLn