URAL 1225 Flags
生活随笔
收集整理的這篇文章主要介紹了
URAL 1225 Flags
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
題目:click here
?
1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int M = 1e5+5; 5 6 int n; 7 ll a[50]; 8 int main() { 9 a[1] = 2; 10 a[2] = 2; 11 a[3] = 4; 12 for( int i=4; i<=45; i++ ) 13 a[i] = a[i-1]+a[i-2]; 14 while( ~scanf("%d", &n ) ) { 15 printf("%I64d\n", a[n] ); 16 } 17 }?
?
轉載于:https://www.cnblogs.com/TaoTaoCome/p/4736443.html
總結
以上是生活随笔為你收集整理的URAL 1225 Flags的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ipadmini5值得买吗
- 下一篇: N使用exus2打造企业maven仓库(