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
2024-03-04 04:47:38
yamatee
2024-03-02 08:46:45
huulj bolku shv
2024-03-02 08:46:15
psda2
2024-02-25 03:51:41
hahahahha
2024-02-23 04:47:23
huulj bolhgui shuu
okey
2024-02-20 07:34:55
int a,s;
cin>>a;
if(a%2==0){
s=(a+1)*(a/2);
}
if(a%2!=0){
s=a*(a/2)+a;
}
cout<<s;
zza
2024-02-06 04:51:44
tuslach
2024-01-15 08:23:31
hh
2024-01-09 14:47:08
davtalt ashiglahgui shde ;(
2024-01-01 06:31:08
#include <iostream>
using namespace std;

int main() {
int n,sum;
cin >> n;
sum = n * (n + 1) / 2;
cout << sum << endl;
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.