UVa 10079 Pizza Cutting

题目链接http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1020
规律题,通过计算可以知道每条线穿过最多条线可以切出最多块。穿过n条线会增加n+1块
#include"stdio.h"
int main()
{
long long a,b;
while(scanf("%lld",&a)&&a>=0)
{
b= 1+n*(n+1)/2;
printf("%lld\n",b);
}
return 0;
}

原文地址:https://www.cnblogs.com/miaosu5limi/p/2932464.html