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
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
2020-07-23 01:02:18
public class Problem76 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int sum = 0;
int n = sc.nextInt();
for (int i = 0; i <= n; i++) {
sum = (int) (sum + (Math.pow(i, 3)));
}
System.out.println(sum);
}
}
2020-06-30 05:07:31
davtalt ashiglaj bodvol muu gsh
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.