結果
| 問題 |
No.718 行列のできるフィボナッチ数列道場 (1)
|
| コンテスト | |
| ユーザー |
aguroshou
|
| 提出日時 | 2018-07-27 23:00:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 876 bytes |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 70,036 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-07-05 03:30:23 |
| 合計ジャッジ時間 | 6,925 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 19 |
ソースコード
#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
using namespace std;
typedef pair <int, int> pii;
int main()
{
//int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0;
//cout << LONG_MAX << endl;
string s, t;
//long long n, A[1000000000];
long long n, m;
//int y[100001], z[100001], x[10001] = {};
//pii y[100001];
//pair<int, float> pii[100001];
int x[1003];
cin >> n;
b = 1;
c = 0;
d = 0;
for ( a = 0; a < n; a++)
{
d = b;
b = b + c;
c = d;
b %= 1000000007;
c %= 1000000007;
}
////std::cout << std::fixed;
//cout << std::setprecision(20) << << endl;
cout << (b*c) % 1000000007 << endl;
return 0;
}
aguroshou