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 1502. Domino Dots

mariam kupatadze it is very easy [3] // Problem 1502. Domino Dots 27 Apr 2008 17:46
In paskal when n=10000 you can not write this expression n*(n+1)*(n+2)/2 in some variables it is very long and big number so in C++ it is very easy just write(here is my AC program):
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    long long n;
    cin>>n;
    cout<<n*(n+1)*(n+2)/2<<endl;
    system("PAUSE");
    return EXIT_SUCCESS;
}

Edited by author 27.04.2008 17:47
Vedernikoff Sergey Re: it is very easy // Problem 1502. Domino Dots 29 Apr 2008 03:23
In Pascal you can use Int64
bekmyrat Re: it is very easy // Problem 1502. Domino Dots 27 Jan 2013 00:00
I Don't Need Your Help!
BORODA Re: it is very easy // Problem 1502. Domino Dots 6 Feb 2013 22:17
why is it true? can u explain me please?)