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
2024-12-09 11:37:57
#include <iostream>
using namespace std;
int main()
{
int n,m,k;
cin>>n;
for(int i=1; i<=n; i++)
{
m=i*i*i;
k=k+m;
}
cout<<k;
} hairtai shu t
2024-12-06 09:17:22
#include<bits/stdc++.h>
using namespace std;

int main(){
long long a,b,n,i,x1,x2,y1,y2,s,geodundaj;
cin >> n ;
s=0 ;
for(i=1 ; i<=n ; i++)
s+=i*i*i ;;
cout << s;
return 0 ;
}
2024-11-29 09:39:23
baby oil
2024-11-19 09:12:44
#include<bits/stdc++.h>
using namespace std;
int main()
{
int long long a,b,c;
cin>>a;
c=(a+1)*a/2;
b=pow(c,2);
cout<<b<<endl;

return 0;
}
teegii
2024-05-28 04:15:21
i like macaroni
2024-01-16 07:30:50
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll n, ans;
cin >> n;
ans = pow(n*(n+1)/2, 2 );
cout << ans;


return 0;
}

2023-11-29 02:29:45
llrin bodogdggu aldaatai bodlogo bn zl
2023-03-20 18:19:18
#include <bits/stdc++.h>

using namespace std;

int main() {

long long n , ans , sum ;

cin >> n ;

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

ans = pow ( sum , 2 ) ;

cout << ans ;

return 0 ;

} fb : Temuk

Last edit: 2023-03-20 18:22:52
2023-03-06 03:57:58
bilguun mal mini hohchii juu :)
2022-11-17 06:58:32
suvdaa minii naiz sprail taviulchuul zugeer ym bishuu

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.