Task: | Loops |
Sender: | Uolevi |
Submission time: | 2018-09-11 21:49:01 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.02 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.02 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.01 s | details |
#6 | WRONG ANSWER | 0.01 s | details |
#7 | WRONG ANSWER | 0.03 s | details |
#8 | WRONG ANSWER | 0.01 s | details |
#9 | WRONG ANSWER | 0.02 s | details |
#10 | WRONG ANSWER | 0.02 s | details |
#11 | WRONG ANSWER | 0.03 s | details |
#12 | WRONG ANSWER | 0.03 s | details |
#13 | WRONG ANSWER | 0.02 s | details |
#14 | WRONG ANSWER | 0.01 s | details |
#15 | WRONG ANSWER | 0.01 s | details |
#16 | WRONG ANSWER | 0.02 s | details |
#17 | WRONG ANSWER | 0.02 s | details |
#18 | WRONG ANSWER | 0.02 s | details |
#19 | WRONG ANSWER | 0.03 s | details |
#20 | WRONG ANSWER | 0.03 s | details |
Code
#include<bits/stdc++.h> using namespace std; int number1; int main(){ cin >> number1; long long x = 0; for(int i=1;i<=number1;i++){ x += (number1-i+1)*(number1-i+2)/2; // cout << x*(x+1) << " " << i*(i+1) << i*x*2 << "\n"; } cout << x << "\n"; }
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: WRONG ANSWER
input |
---|
263528 |
correct output |
---|
3050239857553560 |
user output |
---|
8095194443928 |
Test 7
Verdict: WRONG ANSWER
input |
---|
630093 |
correct output |
---|
41693157083373415 |
user output |
---|
8974762303335 |
Test 8
Verdict: WRONG ANSWER
input |
---|
108426 |
correct output |
---|
212452122723676 |
user output |
---|
8327359530332 |
Test 9
Verdict: WRONG ANSWER
input |
---|
407203 |
correct output |
---|
11253428501536410 |
user output |
---|
8985077276314 |
Test 10
Verdict: WRONG ANSWER
input |
---|
798489 |
correct output |
---|
84851044799375085 |
user output |
---|
8915816703725 |
Test 11
Verdict: WRONG ANSWER
input |
---|
699773 |
correct output |
---|
57111314541226175 |
user output |
---|
8302706731199 |
Test 12
Verdict: WRONG ANSWER
input |
---|
535193 |
correct output |
---|
25549503060424365 |
user output |
---|
8633926203053 |
Test 13
Verdict: WRONG ANSWER
input |
---|
951724 |
correct output |
---|
143675653860541900 |
user output |
---|
8396513920460 |
Test 14
Verdict: WRONG ANSWER
input |
---|
997759 |
correct output |
---|
165549173593263040 |
user output |
---|
8476736801728 |
Test 15
Verdict: WRONG ANSWER
input |
---|
368832 |
correct output |
---|
8362537201182784 |
user output |
---|
8727026214976 |
Test 16
Verdict: WRONG ANSWER
input |
---|
497882 |
correct output |
---|
20569827174211084 |
user output |
---|
8568892775948 |
Test 17
Verdict: WRONG ANSWER
input |
---|
235672 |
correct output |
---|
2181615649088424 |
user output |
---|
7808146531240 |
Test 18
Verdict: WRONG ANSWER
input |
---|
721959 |
correct output |
---|
62717416230802340 |
user output |
---|
8718308266916 |
Test 19
Verdict: WRONG ANSWER
input |
---|
328943 |
correct output |
---|
5932184601121240 |
user output |
---|
8254321349080 |
Test 20
Verdict: WRONG ANSWER
input |
---|
779320 |
correct output |
---|
78885627953685640 |
user output |
---|
8821998101640 |