Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define d(x) cout << #x << " = " << (x) << endl;
- int main(void) {
- #ifndef ONLINE_JUDGE
- clock_t tStart = clock();
- freopen("in.txt", "r", stdin);
- freopen("out.txt", "w", stdout);
- #endif
- int n = 1000000000;
- unsigned long long int nsum = (n*(n+1))/2;
- cout << nsum << endl;
- unsigned long long int p = 1000000000;
- unsigned long long int psum = (p*(p+1))/2;
- cout << psum << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement