Patrick Ragi (pipo1991)
Pages
Saturday, 13 October 2012
UVA - 10079 - Pizza Cutting
#include <stdio.h>
int main()
{
long x;
while(1){
scanf("%ld",&x);
if(x<0)
break;
printf("%ld\n",x*(x+1)/2+1);
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment