Code Submission Evaluation System Login

HIIT Open 2017

Start:2017-05-27 11:00:00
End:2017-05-27 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2017 - Results
History
2017-05-27 12:55:54
2017-05-27 11:14:47
Task:Algorithm
Sender:HIIT AND RUN
Submission time:2017-05-27 12:55:54
Language:C++
Status:READY
Result:ACCEPTED

Test results

testverdicttime (s)
#1ACCEPTED0.05 / 0.50details
#2ACCEPTED0.06 / 0.50details
#3ACCEPTED0.05 / 0.50details
#4ACCEPTED0.05 / 0.50details
#5ACCEPTED0.05 / 0.50details
#6ACCEPTED0.03 / 0.50details
#7ACCEPTED0.06 / 0.50details
#8ACCEPTED0.05 / 0.50details
#9ACCEPTED0.06 / 0.50details
#10ACCEPTED0.04 / 0.50details
#11ACCEPTED0.03 / 0.50details
#12ACCEPTED0.04 / 0.50details
#13ACCEPTED0.07 / 0.50details
#14ACCEPTED0.03 / 0.50details
#15ACCEPTED0.05 / 0.50details
#16ACCEPTED0.04 / 0.50details
#17ACCEPTED0.04 / 0.50details
#18ACCEPTED0.06 / 0.50details
#19ACCEPTED0.06 / 0.50details
#20ACCEPTED0.06 / 0.50details

Code

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main() {
    ios_base::sync_with_stdio(0);

    ll n;
    cin >> n;
/*    
    long long z = 0;
    for (int a = 1; a <= n; a++)
        for (int b = a; b <= n; b++)
            for (int c = a; c <= b; c++)
                z++;
    cout << z << "\n";
  

    for (ll n = 1; n < 1000000; ++n) {

    ll ans = 0;
    for (int i = 1; i <= n; i++) {
        ans += (i*(i+1ll)) / 2ll;
    }*/
    
    ll ans2 = 0;
    for (int i = 1; i <= n; i++) {
        ans2 += i * (n - i + 1);
    }
    
    cout << ans2 << "\n";
    
    
}

Test details

Test 1

Verdict: ACCEPTED

input
1
view   save

correct output
1
view   save

user output
1
view   save

Test 2

Verdict: ACCEPTED

input
2
view   save

correct output
4
view   save

user output
4
view   save

Test 3

Verdict: ACCEPTED

input
3
view   save

correct output
10
view   save

user output
10
view   save

Test 4

Verdict: ACCEPTED

input
4
view   save

correct output
20
view   save

user output
20
view   save

Test 5

Verdict: ACCEPTED

input
5
view   save

correct output
35
view   save

user output
35
view   save

Test 6

Verdict: ACCEPTED

input
263528
view   save

correct output
3050239857553560
view   save

user output
3050239857553560
view   save

Test 7

Verdict: ACCEPTED

input
630093
view   save

correct output
41693157083373415
view   save

user output
41693157083373415
view   save

Test 8

Verdict: ACCEPTED

input
108426
view   save

correct output
212452122723676
view   save

user output
212452122723676
view   save

Test 9

Verdict: ACCEPTED

input
407203
view   save

correct output
11253428501536410
view   save

user output
11253428501536410
view   save

Test 10

Verdict: ACCEPTED

input
798489
view   save

correct output
84851044799375085
view   save

user output
84851044799375085
view   save

Test 11

Verdict: ACCEPTED

input
699773
view   save

correct output
57111314541226175
view   save

user output
57111314541226175
view   save

Test 12

Verdict: ACCEPTED

input
535193
view   save

correct output
25549503060424365
view   save

user output
25549503060424365
view   save

Test 13

Verdict: ACCEPTED

input
951724
view   save

correct output
143675653860541900
view   save

user output
143675653860541900
view   save

Test 14

Verdict: ACCEPTED

input
997759
view   save

correct output
165549173593263040
view   save

user output
165549173593263040
view   save

Test 15

Verdict: ACCEPTED

input
368832
view   save

correct output
8362537201182784
view   save

user output
8362537201182784
view   save

Test 16

Verdict: ACCEPTED

input
497882
view   save

correct output
20569827174211084
view   save

user output
20569827174211084
view   save

Test 17

Verdict: ACCEPTED

input
235672
view   save

correct output
2181615649088424
view   save

user output
2181615649088424
view   save

Test 18

Verdict: ACCEPTED

input
721959
view   save

correct output
62717416230802340
view   save

user output
62717416230802340
view   save

Test 19

Verdict: ACCEPTED

input
328943
view   save

correct output
5932184601121240
view   save

user output
5932184601121240
view   save

Test 20

Verdict: ACCEPTED

input
779320
view   save

correct output
78885627953685640
view   save

user output
78885627953685640
view   save