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
2022-09-11 15:32:55
#include<bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
long long x,y,z,s,a,b,c;
cin>>x;
cout<<(x*x*(x+1)*(x+1))/4;
}ez

2022-01-17 14:07:58
#include<bits/stdc++.h>
using namespace std;
int main()
{
int long long a,b,c;
scanf("%lld",&a);
c=(a+1)*a/2;
b=pow(c,2);
printf("%lld",b);
return 0;
}
mai huuhduudee long long gej bic ;)
2022-01-14 10:58:03
ene spoj pizda chin zov yumiig buruu ged hunii uuriig hurgej bna
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(){
int n,a=0,i=1;
scanf("%d",&n);
for(int i=1;i<=n;i++){
a=a+pow(i,3);
} printf("%d",a);
}
2021-12-16 11:30:23
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

long n, sum=0;

n = input.nextLong();

sum = (n*(n+1)/2);

System.out.println(sum*sum);

input.close();
}
}

Java heldeer dawtalt ashiglahgu ingj boddim bnshu

Last edit: 2021-12-17 16:02:51
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;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.