ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1068. Sum

Что не так?! C#
Posted by Юрий 31 May 2016 18:54
using System;

namespace Consoleapp
{
    class Program
    {
        static void Main(string[] args)
        {
            int sum = 0;
            int len = Convert.ToInt32(Console.ReadLine());
            for (int i = 2; i <= len; i++)
            {
                sum = sum + i;
            }
            Console.WriteLine(sum);
        }
    }
}
Re: Что не так?! C#
Posted by Oleg Baskakov 31 May 2016 19:00
Absolute value not exceeding 10000 means the number can be in range -10000..10000.