当前位置:网站首页>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;
}
边栏推荐
- Tronapi wave field interface - source code without encryption - can be opened twice - interface document attached - package based on thinkphp5 - detailed guidance of the author - July 6, 2022 - Novice
- Qt Charts使用(重写QChartView,实现一些自定义功能)
- 調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
- 年薪50w阿里P8亲自下场,教你如何从测试进阶
- let const
- Greenplum 6.x build_ Environment configuration
- Download and install orcale database11.2.0.4
- Pointer advanced, string function
- leetcode134. gas station
- Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
猜你喜欢
oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
Image segmentation in opencv
[MySQL] detailed explanation of trigger content of database advanced
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
Three series of BOM elements
Count sort (diagram)
Other 7 features of TCP [sliding window mechanism ▲]
登山小分队(dfs)
Quick sorting (detailed illustration of single way, double way, three way)
[Nanjing University] - [software analysis] course learning notes (I) -introduction
随机推荐
Qt Charts使用(重写QChartView,实现一些自定义功能)
Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
Newly found yii2 excel processing plug-in
[Yu Yue education] higher vocational English reference materials of Nanjing Polytechnic University
selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
[Yu Yue education] C language programming reference of Zhongbei College of Nanjing Normal University
数字三角形模型 AcWing 275. 传纸条
Gson converts the entity class to JSON times declare multiple JSON fields named
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
阿里p8推荐,测试覆盖率工具—Jacoco,实用性极佳
NCS Chengdu New Electric interview Experience
FPGA knowledge accumulation [6]
Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
使用AGC重签名服务前后渠道号信息异常分析
Lenovo hybrid cloud Lenovo xcloud: 4 major product lines +it service portal
说一个软件创业项目,有谁愿意投资的吗?
How to realize sliding operation component in fast application
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
Tronapi wave field interface - source code without encryption - can be opened twice - interface document attached - package based on thinkphp5 - detailed guidance of the author - July 6, 2022 - Novice