热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_52668597
踏过山河,踏过海
4 年前
trueweixin_52668597

蓝桥杯_递归_4.9斐波那契数列
#include<iostream>
#include<vector>
using namespace std;

int main()
{
int n;
cin >> n;
vector<int>v;
v.push_back(0);
v.push_back(1);
for(int i=2;i<=n;i++){
v.push_back(v[i-1]+v[i-2]);
}
cout << v[n]%10007 << endl;

return 0;
}

CSDN App 扫码分享
分享
1
点赞
打赏
  • 复制链接
  • 举报
下一条:
原生js复制 // 复制 copyDetail() { var message = document.getElementById(‘id’).innerText var input = document.createElement('input') input.value = message document.body.appendChild(input) input.select() input.setSelectionRange(0, input.value.length) document.execCommand('Copy') document.body.removeChild(input) this.$message({ message: '复制成功', type: 'success', }) }
立即登录