UVA Online Judge Solutions in C++
8/01/2013
10079 - Pizza Cutting - UVA
#include<iostream>
using
namespace
std
;
int
main
(
)
{
long
long
N , Max
;
while
(
true
)
{
cin
>>
N
;
if
(
N
<
0
)
break
;
else
{
Max
=
N
*
(
N
+
1
)
/
2
+
1
;
cout
<<
Max
<<
endl
;
}
}
return
0
;
}
You can find more of my solutions on
Here
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment