Task: | Algorithm |
Sender: | oispa opiskelupaikka tefyllä ;...; |
Submission time: | 2017-05-27 11:11:30 +0300 |
Language: | C++ |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.05 s | details |
#2 | ACCEPTED | 0.04 s | details |
#3 | ACCEPTED | 0.05 s | details |
#4 | ACCEPTED | 0.03 s | details |
#5 | ACCEPTED | 0.05 s | details |
#6 | ACCEPTED | 0.05 s | details |
#7 | ACCEPTED | 0.05 s | details |
#8 | ACCEPTED | 0.04 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | ACCEPTED | 0.07 s | details |
#11 | ACCEPTED | 0.03 s | details |
#12 | ACCEPTED | 0.06 s | details |
#13 | ACCEPTED | 0.07 s | details |
#14 | ACCEPTED | 0.03 s | details |
#15 | ACCEPTED | 0.05 s | details |
#16 | ACCEPTED | 0.04 s | details |
#17 | ACCEPTED | 0.08 s | details |
#18 | ACCEPTED | 0.05 s | details |
#19 | ACCEPTED | 0.04 s | details |
#20 | ACCEPTED | 0.05 s | details |
Code
#include <bits/stdc++.h> using namespace std; int main(){ long long n; cin >> n; long long z2 = 0; long long lis = 0; for(long long i = 1; i <= n; ++i){ lis+=i; z2+=lis; } cout << z2 << endl; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
1 |
user output |
---|
1 |
Test 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
4 |
user output |
---|
4 |
Test 3
Verdict: ACCEPTED
input |
---|
3 |
correct output |
---|
10 |
user output |
---|
10 |
Test 4
Verdict: ACCEPTED
input |
---|
4 |
correct output |
---|
20 |
user output |
---|
20 |
Test 5
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
35 |
user output |
---|
35 |
Test 6
Verdict: ACCEPTED
input |
---|
263528 |
correct output |
---|
3050239857553560 |
user output |
---|
3050239857553560 |
Test 7
Verdict: ACCEPTED
input |
---|
630093 |
correct output |
---|
41693157083373415 |
user output |
---|
41693157083373415 |
Test 8
Verdict: ACCEPTED
input |
---|
108426 |
correct output |
---|
212452122723676 |
user output |
---|
212452122723676 |
Test 9
Verdict: ACCEPTED
input |
---|
407203 |
correct output |
---|
11253428501536410 |
user output |
---|
11253428501536410 |
Test 10
Verdict: ACCEPTED
input |
---|
798489 |
correct output |
---|
84851044799375085 |
user output |
---|
84851044799375085 |
Test 11
Verdict: ACCEPTED
input |
---|
699773 |
correct output |
---|
57111314541226175 |
user output |
---|
57111314541226175 |
Test 12
Verdict: ACCEPTED
input |
---|
535193 |
correct output |
---|
25549503060424365 |
user output |
---|
25549503060424365 |
Test 13
Verdict: ACCEPTED
input |
---|
951724 |
correct output |
---|
143675653860541900 |
user output |
---|
143675653860541900 |
Test 14
Verdict: ACCEPTED
input |
---|
997759 |
correct output |
---|
165549173593263040 |
user output |
---|
165549173593263040 |
Test 15
Verdict: ACCEPTED
input |
---|
368832 |
correct output |
---|
8362537201182784 |
user output |
---|
8362537201182784 |
Test 16
Verdict: ACCEPTED
input |
---|
497882 |
correct output |
---|
20569827174211084 |
user output |
---|
20569827174211084 |
Test 17
Verdict: ACCEPTED
input |
---|
235672 |
correct output |
---|
2181615649088424 |
user output |
---|
2181615649088424 |
Test 18
Verdict: ACCEPTED
input |
---|
721959 |
correct output |
---|
62717416230802340 |
user output |
---|
62717416230802340 |
Test 19
Verdict: ACCEPTED
input |
---|
328943 |
correct output |
---|
5932184601121240 |
user output |
---|
5932184601121240 |
Test 20
Verdict: ACCEPTED
input |
---|
779320 |
correct output |
---|
78885627953685640 |
user output |
---|
78885627953685640 |