阿牛的EOF牛肉串
2015-12-01 13:37
381 查看
#include <iostream>
using namespace std;
int main()
{
int n;
long long int a[40];
a[1] = 3; a[2] = 8;
while (cin >> n)
{
for (int i = 3; i < 40; i++)
{
a[i] = 2 * (a[i - 2] + a[i - 1]);
}
cout << a
<< endl;
}
return 0;
}
using namespace std;
int main()
{
int n;
long long int a[40];
a[1] = 3; a[2] = 8;
while (cin >> n)
{
for (int i = 3; i < 40; i++)
{
a[i] = 2 * (a[i - 2] + a[i - 1]);
}
cout << a
<< endl;
}
return 0;
}
相关文章推荐
- 12.1 學習筆記 html div塊邊框圓角,footer在div影響下沒有在底部解決,android Viewgroup根據xy獲取在子view
- MySQL与Oracle的语法区别详细对比
- Oracle与MySQL的几点区别
- java volatile
- UITabBarController 笔记(一)AppDelegate中加UITabBarController 为 rootViewController
- formValidator的一些验证实例
- CyclicBarrier介绍
- 135漏洞利用
- 问题之~SecureCRT终端只能输出无法输入
- 【LeetCode】171 Excel Sheet Column Number
- 遇到的一个坑
- 骨牌铺方格
- AlertDialog弹出框-常用几种写法
- 修改tp-wr841n-v8的flash
- TJU 2944 Mussy Paper 最大权闭合子图
- 《swift2.0 官方教程中文版》 第2章-13继承
- easyui--dialog
- 信息检索(IR)的评价指标介绍 - 准确率、召回率、F1、mAP、ROC、AUC
- acm 2048 错排公式!!!!!!!
- 【LeetCode】242 Valid Anagram