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.|

RGB7214 - Үржвэр нийлбэр 2

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

Input

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

Output

Нийлбэр

Example

Input:
5
Output:
35

Нэмсэн: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
2022-05-26 02:00:49
ez
2022-05-16 08:15:30
#include <stdio.h>
#include <math.h>
main()
{
//freopen("RGB7214.in","r",stdin);
//freopen("RGB7214.out","w",stdout);
int a,b,c,d,e,f,g,h,i;
scanf("%d",&a);
b=0;
for(d=0;d<=a;d=d+1)
{
b=b+d*(a-d+1);

}
printf("%d",b);
}
2022-04-28 15:31:49
Anar MNII DUU YAVJ BITCHESTEI BOL
2022-03-28 10:15:07
#include<stdio.h>
int main(){
int i,n,s=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{s=s+i*(n-i+1);}
printf("%d",s);
}
mai suguudaa c deer shuu huuluul huul
2022-01-17 06:58:43
While bish for oor bodson n bnu
2021-11-19 00:12:21
int a, b=0;
Scanner cs = new Scanner(System.in);
a = cs.nextInt();
for(int i=1; i<=a; i++){
b=b+i*(a-i+1);
}
System.out.print(b);

2021-10-22 13:11:00
uunuu mni duu baga angidaa suu
2019-12-26 08:25:44
int a;
cin >> a;
int n = 0;
int b = 1;
int e;
int c = 0;
while (n < a)
{
n = (n + 1);
b = (n + 1);
e = (n * b);
c = (c + e);
}
cout << c / 2 << endl; // ez bailaa
2019-12-02 06:34:07
#include <iostream>

using namespace std;

int main(){
int a, b, sum;
cin >> a >> b;
sum = a * b;
while(a != b){
if(a > b){
a -= b;
}else{
b -= a;
}
}
cout << sum / a << endl;
}





uur bodlogo des hohin ahhahhhahhah
2019-12-02 06:32:39
goy juuu
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.