結果
問題 |
No.657 テトラナッチ数列 Easy
|
ユーザー |
👑 |
提出日時 | 2020-02-11 23:06:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 467 bytes |
コンパイル時間 | 582 ms |
コンパイル使用メモリ | 71,656 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 09:12:09 |
合計ジャッジ時間 | 3,810 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 13 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> dta; for(int i = 0; 3 > i; i++){ dta.push_back(0); } dta.push_back(1); for(int i = 0; 1000000 > i; i++){ int t = 0; for(int j = dta.size()-1; dta.size()-4 <= j; j--){ t = (t+dta[j])%17; } dta.push_back(t); } int q;cin>>q; while(q--){ int z;cin>>z; cout << dta[--z] << endl; } }