long long a;
sample:
int main() {
..long long a;
..a = 22345672948472475823;
.. printf ("%lld\n", a);
}
*for scanf and printf use the flag "%lld" *
Just that,
Good Luck!

Moderator: Board moderators
Code: Select all
#ifdef ONLINE_JUDGE /* parts for OJ system check */
#define LONG long long int
#define L_IN "%lld"
#else /* Windows VC++ part */
#define LONG __int64
#define L_IN "%I64d"
#endif
LONG a;
scanf(L_IN,&a);
printf(L_IN,a);
Code: Select all
cout<<((n*(n+1))/2)+1<<endl;
Code: Select all
cout<<n*n*.5+n*.5+1<<endl;
Code: Select all
cout<<(long long)n*n*.5+n*.5+1<<endl;