Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7213 - Үржвэр нийлбэр 1

1*2+2*3+3*4+...+n*(n+1) нийлбэрийг ол.

Input

Натурал тоо өгөгдөнө.

Output

Нийлбэр

Example

Input:
5

Output:
70

Нэмсэн:Bataa
Огноо:2013-01-21
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2024-11-24 18:20:56
#include <iostream>
using namespace std;
int main() {
int n,i,b=0,j;
cin>>n;
for(i=1;i<=n;i++){
b=b+(i*(i+1));
}cout<<b;
}
sn yrih yum bol 4r angiin huuhed bodno shuu neeree
2024-11-19 07:33:48
buyn boliidoo batuka huslee javhaa suldee sain huulaad avaarai
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",(n*(n+1)*(n+2))/3);
}
2024-08-16 07:00:06
#include<bits/stdc++.h>
using namespace std;
main(){
int a=0,b,c,i=1;
scanf("%d",&b);
for(i=1; i<=b; i++){
a=a+(i+1)*i;

}printf("%d",a);
}
//from knight
2024-07-11 17:27:43
int n, a;
scanf ("%d",&n);
a=n*(n+1)*(n+2)/3;
printf("%d",a);
return 0;
2024-05-13 04:48:48
hudlaa teneg shuu hahahah
2024-05-13 04:47:51
7-1 delgerdalai uhaantai boy
2024-05-13 04:46:03
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

// Headers
string toString (double);
int toInt (string);
double toDouble (string);

int main() {
int a, i, n;

a = 0;
cin >> n;
for (i = 1; i <= n; i++) {
a = a + (i + 1) * i;
}
cout << a << endl;
return 0;
}

// The following implements type conversion functions.
string toString (double value) { //int also
stringstream temp;
temp << value;
return temp.str();
}

int toInt (string text) {
return atoi(text.c_str());
}

double toDouble (string text) {
return atof(text.c_str());
}
2024-04-07 10:55:07
int a,b,c,d;
cin>>a>>b>>c>>d;
cout<<(a+b+c+d);
2023-08-24 12:40:42
#include<iostream>
using namespace std;
int main ( ) {
long long n, a=0;
cin >> n;
for (int i = 1; i <= n; i++){
a = a + (i + 1) * i;
}
cout << a;
return 0;
}
2023-07-02 13:35:32
#include <bits/stdc++.h>
using namespace std;

int main() {



long long a[1000],b=0,n,i,r,e,c,s=1,d=-132423;
cin>>n;

for(i=1; i<=n; i++){
s=i*(i+1);
b+=s;

}

cout<<b;
return 0;
}
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
AHLAH DESLEGCH LHAMJAM G.TAMIR OD GEDEG NERTEI TSAGDAA NARTAI TAARVAL ZUGTAARAI BOLGOOMJTOI BAIGAARAI MEDREL MUUTAI BAS AYULTAI SHUU!!!!!!!!!!!!!!!!!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.