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

RGB7072 - Нийлбэр 3

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

Input

Сондгой натурал тоо өгөгдөнө.

Output

Нийлбэр.

Example

Input:
9

Output:
25

Нэмсэн: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
2022-03-21 04:48:28
ez


Last edit: 2022-03-21 04:48:46
2022-03-21 04:48:28
too ez

Last edit: 2022-03-21 04:49:01
2022-01-19 05:31:31
n=int(input())
i=1
a=0
if i%2==1 :
while i<n+1 :
a=a+i;
i=i+2
print (a)

PYTHON3
2021-10-11 12:44:49
#include <iostream>
using namespace std;

int main() {
int a;
cin>>a;
cout<<(a+1)*(a+1)/4;
return 0;
}
MECHA SHDEEE
2021-02-11 05:10:17
#include <stdio.h>
main()
{int n;
scanf("%d", &n);
printf("%d", (n+1)*(n+1)/4);
return 0;
}
baga angidaa suu hulgaichuud
2020-12-08 11:41:28
another way xD
#include <iostream>

using namespace std;

int main(){

int num;
cin >> num;

cout << (1 + num) * (num / 2 + 1) / 2 << endl;

return 0;
}
2020-11-27 09:33:43
congratz 56 problem solved
2020-11-10 11:27:07
Давталт ашиглахгүй бодоход ганц томъёо бичээд болоо юм байна:
sum = (n + 1 ) * (n + 1) / 4;
2020-10-25 17:22:45
#include <iostream>
using namespace std;


int main () {
int n,s=0,i=1;
cin >> n;
for(i=0;i<=n;i++)
if (i%2==0) {
i = i+1;
s = s+i;
}
cout << s << endl;
}
2020-10-25 17:22:29
davtalt ashiglahgui gesen mortloo ajlaad l bn shde
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.