結果
問題 |
No.314 ケンケンパ
|
ユーザー |
|
提出日時 | 2019-04-08 22:31:03 |
言語 | Nim (2.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 176 bytes |
コンパイル時間 | 3,091 ms |
コンパイル使用メモリ | 65,828 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 22:55:24 |
合計ジャッジ時間 | 3,848 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 RE * 11 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 34) Warning: imported and not used: 'sugar' [UnusedImport]
ソースコード
import sequtils, strutils, math, sugar const M = 10 ^ 9 + 7 let n = stdin.readLine.parseInt var dp = @[1, 2, 2] for i in 3..<n: dp.add dp[i-2] + dp[i-3] echo dp[n-1] mod M