|
|
back to boardit is very easy 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 Re: it is very easy In Pascal you can use Int64 Re: it is very easy I Don't Need Your Help! Re: it is very easy Posted by BORODA 6 Feb 2013 22:17 why is it true? can u explain me please?) |
|
|