当前位置:网站首页>hdu2018 母牛的故事(模拟)
hdu2018 母牛的故事(模拟)
2022-08-08 18:57:00 【51CTO】
母牛的故事
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 82061 Accepted Submission(s): 40744
Problem Description
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?
Input
输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0<n<55),n的含义如题目中描述。
n=0表示输入数据的结束,不做处理。
Output
对于每个测试实例,输出在第n年的时候母牛的数量。
每个输出占一行。
Sample Input
Sample Output
Author
lcy
Source
Recommend
lcy | We have carefully selected several similar problems for you: 2045 2050 2021 1297 2048
Statistic | Submit | Discuss | Note
其实我就想做作水题 调节一下心情
起初一看 懵逼。。
然后仔细想想
一岁的母牛由四岁及四岁以上的母牛得到
二岁的母牛由一岁的母牛得到
三岁的母牛由二岁的母牛得到
四岁母牛由三岁母牛得到。。
模拟一下~
边栏推荐
- Learn about layered architecture & SOA architecture together
- JDBC最详讲解(快速入门)
- Vue program of web cache problem after packaging
- 传音控股:目前公司手机产品暂无明确计划进入中国市场
- BP neural network
- Style Design Principles in Open Office XML Format
- Which company is the best for futures account opening? It must be formal and safe
- 01. Preface
- A Preliminary Study on Pannellum, a Lightweight Panorama Viewer
- synApps -- Autosave
猜你喜欢
SSM项目整合——综合案例
Generate captchas tools
C语言初阶-结构体
Vue program of web cache problem after packaging
The origin and creation of Smobiler's complex controls
Performance optimization | CPU power management from the perspective of ping delay
Rethinking HTAP database caused by rereading GPDB and TiDB papers
What is the main purpose of software testing?
几何g6将搭载harmonyos系统,产品竞争力全面升级
leetcode 240.搜索二维矩阵II 分治思想
随机推荐
DHCP服务初探
Flush can buy stock?Is it safe to buy stocks?
Monaco-Editor 多人协作 编辑器
Oracle--表
Generate captchas tools
El - tree set radio, click finish after assemble
最长子串(长沙理工大学第十一届程序设计竞赛 离线 做了n天.....崩溃了)
Group DETR:分组一对多匹配是加速DETR收敛的关键
odoo 登录布局调整
5 IPOs, Internet home improvement is not as simple as Tubatu thinks
使用 lua 运行 fscript
21天学习挑战赛——机器学习01
How is the private key generated by OpenSSH used in putty?
SSM project integration, integrated case
智驾科技完成C1轮融资,此前2轮已融4.5亿元
分布式文件系统fastDFS
The history of cartoon rendering
el-tree设置单选,点击完成后收起
shell九九乘法口诀表
软件测试主要是做什么的?