当前位置:网站首页>切面条 C语言
切面条 C语言
2022-07-01 21:47:00 【大菜彩】
切面条
一根高筋拉面,中间切一刀,可以得到2根面条。
如果先对折1次,中间切一刀,可以得到3根面条。
如果连续对折2次,中间切一刀,可以得到5根面条。 那么,连续对折10次,中间切一刀,会得到多少面条呢?
思路:
源码:
#include<stdio.h>
#include<math.h>
int main()
{
double sum=2;
for(int n=1;n<=10;n++)
sum+=pow(2.0,n-1);
printf("%.0f",sum);
return 0;
}
边栏推荐
猜你喜欢

Classify boost libraries by function

The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner

固定资产管理子系统报表分为什么大类,包括哪些科目

MySQL MHA high availability configuration and failover

Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue

Mysql——》MyISAM存储引擎的索引

C#/VB.NET 给PDF文档添加文本/图像水印

Fully annotated SSM framework construction

Indicator trap: seven KPI mistakes that it leaders are prone to make

Business visualization - make your flowchart'run'up
随机推荐
【生态伙伴】鲲鹏系统工程师培训
【MySQL】索引的分类
linux下清理系统缓存并释放内存
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
LC501. 二叉搜索树中的众数
Qtreeview+qabstractitemmodel custom model: the third of a series of tutorials [easy to understand]
快乐数[环类问题之快慢指针]
MySQL series transaction log redo log learning notes
园区全光技术选型-中篇
[ecological partner] Kunpeng system engineer training
In the past 100 years, only 6 products have been approved, which is the "adjuvant" behind the vaccine competition
Using closures to switch toggle by clicking a button
JVM有哪些类加载机制?
Clean up system cache and free memory under Linux
【目标跟踪】|单目标跟踪指标
Sonic cloud real machine learning summary 6 - 1.4.1 server and agent deployment
微信开放平台扫码登录[通俗易懂]
Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
Pytorch sharpening chapter | argmax and argmin functions