当前位置:网站首页>切面条 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
- [monomer] recommended configuration of streaming information i-bpsv3 server
- 互联网的智算架构设计
- 比较版本号[双指针截取自己想要的字串]
- 二叉树的基本操作
- List announced | outstanding intellectual property service team in China in 2021
- The correct way to set the bypass route
- Pytorch sharpening chapter | argmax and argmin functions
- 基准环路增益与相位裕度的测量
- Mysql——》索引存储模型推演
猜你喜欢
随机推荐
Icml2022 | interventional contrastive learning based on meta semantic regularization
三翼鸟两周年:羽翼渐丰,腾飞指日可待
Show member variables and methods in classes in idea
JVM有哪些类加载机制?
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
List announced | outstanding intellectual property service team in China in 2021
Make a three digit number of all daffodils "recommended collection"
Redis配置与优化
Learn MySQL from scratch - database and data table operations
Simple interactive operation of electron learning (III)
[monomer] recommended configuration of streaming information i-bpsv3 server
Indicator trap: seven KPI mistakes that it leaders are prone to make
详解Kubernetes网络模型
Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue
2020-ViT ICLR
比较版本号[双指针截取自己想要的字串]
GaussDB(DWS)主动预防排查
Clean up system cache and free memory under Linux
linux下清理系统缓存并释放内存
黑马程序员-软件测试--06阶段2-linux和数据库-01-08第一章-linux操作系统阶段内容说明,linux命令基本格式以及常见形式的说明,操作系统的常见的分类,查看命令帮助信息方法,









