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

RGB7075 - Нийлбэр 4

Өгөгдсөн n тоо хүртэлх натурал тоонуудын кубуудын нийлбэрийг ол.

Давталт ашиглахгүй бодвол сайн. 

13+23+33+...+n3.

Input

n натурал тоо өгөгдөнө. n<=2000.

Output

Нийлбэр

Example

Input:

5

Output:

225


Нэмсэн:Bataa
Огноо:2013-01-15
Хугацааны хязгаарлалт: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
2021-10-20 12:48:40
hooy uunuu huul pisda mn
odoo dooshoo yavuulah gj l bnu ich gulguu
2021-04-03 02:57:53
a = int(input())
d = 0
for x in range(1,a+1,1):
d = d + x*x*x
print(d)
#python huuhduud
2021-04-02 09:19:14
#include <stdio.h>
#include <math.h>

int main(void) {
int n, s;
scanf("%d", &n);
s=pow((n*(n+1)/2) , 2);
printf("%d", s);
return 0;
} bolooshdee
2021-04-02 09:13:25
dawtaltaa boliochee baliar ymnud
2021-02-16 05:05:46
#include <iostream>
using namespace std;

int main() {

// your code here
long long i,s,a;
s=0;
cin>>a;
for (i = 1; i<=a; i=i+1){
s=s+i*i*i;

}
cout<<s;
return 0;
}

huultsgaa gehdee oilgoj huulaarai za yu
2020-10-30 02:28:06
# include<iostream>
using namespace std;
main(){
long long b , c=1 , d=1;
cin>>b;
while(c<=b){
d=d+c*c*c;
c++;
}
cout<<d;
}
2020-10-30 02:20:19
#include<iostream>
using namespace std;
int main(){
int a,s=0,t=1,m=0;
cin>>a;
for(int t=1;t<=a;t++){
m=m+(t*t*t);
}
cout<<m;
return 0;
}
2020-10-29 10:59:35
#include<iostream>
using namespace std;
int main(){
int a,s=0,t=1,m=0;
cin>>a;
for(int t=1;t<=a;t++){
m=m+(t*t*t);
}
cout<<m;
return 0;
}
Ene buruu yomuu
2020-10-19 19:33:18
#include <iostream>
#include <math.h>

using namespace std;

int main(){
int n;
cin>>n;
int sum = pow(((n*(n+1))/2),2);
cout<<sum;
}
2020-07-23 01:04:41


import java.util.Scanner;

public class Problem76 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int sum;
int n = sc.nextInt();
sum = (int) Math.pow((n * (n + 1)) / 2, 2);
System.out.println(sum);
}
}


Last edit: 2020-07-23 01:05:05
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.