[ACM]Q10302: Summation of Polynomials
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
namespace Q10302
{
class Program
{
static private int _n; static private bool ntof; static private BigInteger sum;
static void Main(string[] args)
{
for (; ; )
{
labeln: Console.Write("n>>>");
ntof = int.TryParse(Console.ReadLine(), out _n);
if (!ntof) goto labeln;
sum = 0;
for (int i = 1; i <= _n; i++)
{
BigInteger temp = 1;
for (int j = 0; j < 3; j++)
temp *= i;
sum += temp;
}
Console.WriteLine("Ans={0}", sum);
}
}
}
}