当前位置:网站首页>切面条 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;
}
边栏推荐
- Slope compensation
- Make a three digit number of all daffodils "recommended collection"
- What is the difference between consonants and Initials? (difference between initials and consonants)
- Slope compensation
- 功能测试报告的编写
- RestTemplate 远程调用工具类
- Qtreeview+qabstractitemmodel custom model: the third of a series of tutorials [easy to understand]
- 【MySQL】索引的分类
- leetcode - 287. 寻找重复数
- Classify boost libraries by function
猜你喜欢
IDA动态调试apk
【图像分割】2021-SegFormer NeurIPS
Clean up system cache and free memory under Linux
Training on the device with MIT | 256Kb memory
Spark interview questions
Business visualization - make your flowchart'run'up
Aidl basic use
Why does blocprovider feel similar to provider?
Copy ‘XXXX‘ to effectively final temp variable
二叉树的基本操作
随机推荐
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
指标陷阱:IT领导者易犯的七个KPI错误
【juc学习之路第8天】Condition
What is the difference between consonants and Initials? (difference between initials and consonants)
Mask wearing detection method based on yolov5
Object memory layout
Learning notes on futuretask source code of concurrent programming series
Dark horse programmer - software testing - stage 06 2-linux and database-01-08 Chapter 1 - description of the content of the Linux operating system stage, description of the basic format and common fo
Basic operation of binary tree
[monomer] recommended configuration of streaming information i-bpsv3 server
Slope compensation
MySQL empties table data
"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition
[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!
Flume interview questions
灵动微 MM32 多路ADC-DMA配置
Interview question: what is the difference between MySQL's Union all and union, and how many join methods MySQL has (Alibaba interview question) [easy to understand]
小 P 周刊 Vol.11
LIS (longest ascending subsequence) problem that can be understood [easy to understand]
mysql 学习笔记-优化之SQL优化