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

RGB7070 - Нийлбэр 1

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

Давталт ашиглахгүй болно.

Input

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

Output

Нийлбэр

Example

Input:
10

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
2019-11-16 04:54:29
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a;
cin>>n;
if(n%2==0) (a=n*(n+1)/2);
else a=(n*(n-1)/2+n);
cout<<a;
}
huul
2019-10-28 07:58:09
suguud aaaaaaaaaaaaaaaaaaaaaaaaa
2019-10-12 07:15:20
bang bang
2019-10-10 14:41:20


Last edit: 2019-10-10 14:42:01
2019-10-03 17:57:12
So ez
2019-09-09 15:45:42
arifmetik progressin tomiyogoor bodno
2019-03-04 13:10:46
#include<bits/stdc++.h>
main()
{
int n,s;
scanf("%d",&n);
if(n%2==0) s=n*(n+1)/2;
else s=(n*(n-1)/2+n);


printf("%d",s);

}
2019-02-27 06:06:20
dawtaltgvi bodono gej yu bsiin
2019-02-27 04:10:24
#include <iostream>
using namespace std;
int main(){
int n;
cin>>n;
cout<<n*(n+1)/2;
}
2019-02-11 16:22:21
dawtaltgui yaj bodoh ym be sedel ogchuul boldoo hehe'
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.