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
2019-11-19 05:22:13
Hervee unshjaagaa bol chi huurhun shuu
2019-11-16 15:00:28
#include<iostream>
using namespace std;
int main()
{
int a,b,i;
cin>>a;
b=0;
{
for(i=1;i<=a;i++)
b=1*b+2*(i-1)+3*(i-2);
}
cout<<b;
return 0;
}
2019-10-26 15:44:26
#include <cstdio>
int main()
{
int a,b=0;
scanf ("%d",&a);
for(int i=1; i<=a; i++){
b=b+i*(a-i+1);
}
printf("%d",b);
return 0;
}
2019-04-08 05:43:26
#include <stdio.h>
int main() {
int n,s=0,i=1;
scanf("%d",&n);
while(n>0)
{ s=s+i*n;
n--;
i++;
}
printf("%d",s);
}
odna
2019-04-08 05:43:26
#include <stdio.h>
int main() {
int n,s=0,i=1;
scanf("%d",&n);
while(n>0)
{ s=s+i*n;
n--;
i++;
}
printf("%d",s);
}
odna
2019-03-27 09:43:43
hha suguud
2019-03-14 06:02:46
#include <bits/stdc++.h>
using namespace std;
int a,b,c,d,i;
int main()
{
scanf("%d",&a);
b=0;
c=0;
{
for(i=1;i<=a;i++)
b=1*b+2*(i-1)+3*(i-2);
}
printf("%d",b);
return 0;
}
2019-03-12 10:30:18
za boliocde suguuda
2019-03-06 04:32:25
bodsn hvn bhq yu tuslaach

2019-02-25 08:43:50
ez
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.