#p3214. 例题3.3.4 煎饼分割问题
例题3.3.4 煎饼分割问题
题目描述
王小二自夸刀工不错,有人放一张大的煎饼在砧板上,问他:“饼不许离开砧板,切n刀最多能分成多少块?”
输入格式
给定一个整数n
输出格式
输出相应答案
样例数据
input
5
output
16
数据规模与约定
时间限制:
空间限制:
Related
In following contests:
王小二自夸刀工不错,有人放一张大的煎饼在砧板上,问他:“饼不许离开砧板,切n刀最多能分成多少块?”
给定一个整数n
输出相应答案
input
5
output
16
2≤n≤1000
时间限制:1s
空间限制:256MB
In following contests:
By signing up a code-fans universal account, you can submit code and join discussions in all online judging services provided by us.