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
2023-12-08 05:13:58
#include <iostream>
using namespace std;

int main() {
int n,a,b,sum=0;
cin >> n;
a = n;
while (a >= 10) {
a /= 10;
}
b = n % 10;

sum= a + b;
cout << sum;

return 0;
}

2023-11-12 02:58:03
bitgui huuullll

Last edit: 2023-11-12 02:58:21
2023-09-05 08:16:52
psda2
2023-07-19 07:55:20
bitgiii huul chi huulad baih ym bol muu surna shuu
2023-03-16 05:00:12
#include <bits/stdc++.h>
int n,i,s;
int main()
{
scanf("%d",&n);
for (i=1;i<=n;i++)
s=s+i;
printf("%d",s);
return 0;
}//huul suguuda
2023-03-15 13:26:39
huulhaa boliochee huuhduud
2023-03-04 09:28:14
#include <bits/stdc++.h>
using namespace std;


int main() {
long long n,s=0;
cin>>n;
long long a[n+1];
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=1;i<n;i++){
if(a[i]<a[i-1]){
s+=(a[i-1]-a[i]);
a[i]=a[i-1];

}
}
cout<<s;
}
2022-12-24 16:38:39
#include <stdio.h>

int add(int x){
if(x == 1) return 1;
return x + add(x - 1);
}

int main(void){
int n, pinecest;
scanf("%d",&n);
pinecest = add(n);
printf("%d",pinecest);
}
2022-12-21 05:22:49
heeeelpppppppppp
2022-11-15 07:28:39
somebody once told me the world is gonna roll ne
I AINT THE SHARPEST TOOL IN THE SHED
WELL THE YEARS START COMING AND THEY DONT STOP COMING'
FED WITH THE TRULES I HIT THE GROUND RUNNING
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.