-
Notifications
You must be signed in to change notification settings - Fork 0
/
problem 6.cpp
60 lines (44 loc) · 1.22 KB
/
problem 6.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define mod 1000000007
#define for1(k,n) for(ll i=k;i<n;i++)
#define for2(k,n) for(ll j=k;j<n;j++)
#define E cout<<endl
#define max 100000
#define matrix vector <vector <ll>>
int main()
{
#ifndef ONLINE_JUDGE
clock_t tStart = clock();
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base:: sync_with_stdio(false);
cin.tie(0);
//////////////////////////////////////start...............
ll sum1 = 0;
ll sum2 = 0;
for (ll i = 1; i <= 100; i++)
{
sum1 = sum1 + pow(i, 2);
sum2 = sum2 + i;
}
cout << sum1 << endl;
cout << sum2 << endl;
sum2 = sum2 * sum2;
cout << sum2 - sum1 << endl;
/////////////////////////////end................................... ....
#ifndef ONLINE_JUDGE
cout << "\nDone in " << (double) clock() / CLOCKS_PER_SEC << "sec" << endl;
#endif
return 0;
}
//c v a s selecting text or x for selecting cut
//ctrl+d after selecting text to select same type
//ctrl+shift+d for copy and paste the line below it
//ctrl+del to delete a text
//ctrl+left to jump left of line or vice versa
//ctrl+shift+"/" to comment whole block and vice versa for undo
//ctrl+"/" for commenting a line