当前位置:网站首页>Calf problem
Calf problem
2022-07-07 08:53:00 【Please Sit Down】
subject : There is a cow on a farm , Now cows オー year , To be four years old オ Can have calves , After the age of four , Give birth to a calf every year . Suppose every time a cow is born , And also abide by 4 The principle of giving birth only after one year , And the cattle born will not die , ask 20 How many cows will there be after the year ?
int main(void){
int i;
int a[21];
a[1] = 1;
a[2] = 1;
a[3] = 1;
for (i=4;i<=20;i++)
a[i] = a[i - 1] + a[i - 3];
for (i=1;i<=20;i++)
printf("%d ", a[i]);
return 0;
}
边栏推荐
- FPGA knowledge accumulation [6]
- What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
- Greenplum 6.x common statements
- [Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
- Problems encountered in the use of go micro
- MySQL partition explanation and operation statement
- 数据库存储---表分区
- Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
- Markdown编辑器Editor.md插件的使用
- 南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
猜你喜欢
Simple use of Xray
Greenplum 6.x common statements
阿里p8推荐,测试覆盖率工具—Jacoco,实用性极佳
All about PDF crack, a complete solution to meet all your PDF needs
[Yugong series] February 2022 U3D full stack class 005 unity engine view
Greenplum6.x监控软件搭建
Digital triangle model acwing 275 Pass a note
Markdown编辑器Editor.md插件的使用
Pointer advanced, string function
Greenplum 6.x build_ install
随机推荐
[Yugong series] February 2022 U3D full stack class 006 unity toolbar
xray的简单使用
You should use Google related products with caution
Other 7 features of TCP [sliding window mechanism ▲]
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
如何统计项目代码行数
登山小分队(dfs)
Newly found yii2 excel processing plug-in
Componentspace2022, assertions, protocols, bindings, and configuration files
Redis summary
Tronapi-波场接口-源码无加密-可二开--附接口文档-基于ThinkPHP5封装-作者详细指导-2022年7月6日-新手快速上手-可无缝升级tp6版本
Novice entry SCM must understand those things
数字三角形模型 AcWing 275. 传纸条
Lenovo hybrid cloud Lenovo xcloud: 4 major product lines +it service portal
Gson converts the entity class to JSON times declare multiple JSON fields named
模拟卷Leetcode【普通】1609. 奇偶树
Greenplum6.x-版本变化记录-常用手册
指针进阶,字符串函数
Why choose cloud native database
How to integrate app linking services in harmonyos applications