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

RGB7071 - Нийлбэр 2

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

12+22+...+n2

Input

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

Output

Нийлбэр

Example

Input:
5

Output:
55

Нэмсэн:Bataa
Огноо:2013-01-06
Хугацааны хязгаарлалт: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-05-16 06:12:00
#include<stdio.h>
int main()
{
int n, s, k, a;
scanf("%d", &n);
s=(1+n)*n/2;
printf("%d", s);
return 0;
}
huul

2024-02-28 01:33:09
SADHE ;>

Last edit: 2024-02-28 01:33:32
2024-01-24 13:58:14
give me this code
2023-12-01 05:38:24
ni bu hao

Last edit: 2023-12-01 05:38:59
2023-10-18 07:34:32


Last edit: 2023-10-18 07:35:05
2023-08-21 06:52:42
#include <iostream>
using namespace std;

int main() {
int a,b,c,d,f,s,h,j,y,t,n,z=0,i;
cin>>a;
for(i=1;i<=a;i++){
z=z+i*i;

}
cout<<z;
}
2023-07-25 14:43:53
#include<stdio.h>
main(){
int a,b,c;

scanf("%d",&a);
b=a*(a+1)*(2*a+1)/6;
printf("%d",b);
} manai neg sartai duu bodloo sug sdanuudaa
2023-07-01 17:27:27
aight everybody here is da frickin formula to this shit right here thank me later
(n*(n+1)*(2*n+1))/6;
2023-05-25 13:35:28
kod n end bna!!!!!!1
xhamster.com
2023-05-02 08:27:28
1234
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.