結果
問題 |
No.314 ケンケンパ
|
ユーザー |
|
提出日時 | 2018-01-31 20:28:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 396 ms |
コンパイル使用メモリ | 38,784 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-12-29 23:51:37 |
合計ジャッジ時間 | 1,266 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 11 |
ソースコード
#include <stdio.h> #include <string.h> #include <math.h> using namespace std; typedef unsigned long long ull; int N; int main(void){ scanf("%d", &N); ull ans[N]; ans[0] = 1; ans[1] = 2; ans[2] = 2; for(int i = 3;i < N;++i){ ans[i] = ans[i-2] + ans[i-3]; } printf("%llu\n", ans[N-1] % (ull) (1e9 + 7)); }