标签:pre 时间 c++ html long size pac http mil
输入N(N <= 1000)
输出数量 Mod 10^9 + 7
3
3
#include <bits/stdc++.h> #define mod 1000000007 using namespace std; long long k[1005]; int main(){ int n,m; cin>>n; k[1]=1,k[2]=2; for(int i=3;i<=n;i++){ k[i]=k[i-1]%mod+k[i-2]%mod; } cout<<k[n]%mod<<endl; return 0; }
标签:pre 时间 c++ html long size pac http mil
原文地址:http://www.cnblogs.com/zllwxm123/p/7390863.html