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

RGB7301 - Ахмад орны цифр

Өгөгдсөн натурал тооны ахмад орны цифрийг ол. 

Input

n натурал тоо өгөгдөнө. (n<=10^6).

Output

Ахмад орны цифр болох нэг цифр байна.

Example

Input:
1234
Output:
1

Нэмсэн:Bataa
Огноо:2013-01-08
Хугацааны хязгаарлалт: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
2020-05-07 09:50:21
int a;
scanf("%d" , &a);
while(a > 9){
a = a / 10;
}
printf("%d" , a);
2020-01-02 04:19:22
#include <iostream>
using namespace std;
int main () {
int n;
cin>>n;

while(n>10){
n=n/10;
}
cout<<n;
return 0;
}

2019-12-10 15:15:24
import java.util.*;
import java.lang.*;

class Main
{
public static void main (String[] args) throws java.lang.Exception
{
int a, i;
Scanner in= new Scanner(System.in);
a = in.nextInt();
while(a>=10)
{
a = a / 10 ;
}
System.out.print(a);
}
}
2019-11-25 07:49:02
a

Last edit: 2019-11-25 08:28:56
2019-10-19 13:39:45
#include <cstdio>
int main()
{
int a;
scanf ("%d", &a);
while(a>10){
a=a/10;
}
printf("%d", a);
}
2019-10-10 14:50:50
#include <cstdio>

int main(){
int n;
scanf("%d" , &n);
while(n > 9){
n /= 10;
}
printf("%d" , n);
}
2019-03-05 13:31:21
#include <stdio.h>
int main()
{
int a,s=0,b;
scanf("%d",&a);
while(a>0)
{
b=a%10; s++;
a=a/10; }

printf("%d",b);
}
--odna--

Last edit: 2019-03-05 13:34:01
2019-03-04 09:47:00
#include <stdio.h>
#include<stdlib.h>
int main()
{
int a,i,s,n,m,b;
scanf("%d",&a); n=a;
while(a>0)
{
b=a%10; s++;
a=a/10; }m=1;
for(i=1; i<s; i++)
{
m=m*10;
}
printf("%d",b);
}
pu
2018-12-19 01:47:26
hai
2018-12-10 04:44:33
#include <iostream>
using namespace std;

int a,i,s,b,j,k,n,m;
main() {
cin>>a; n=a;
while(a>0){
b=a%10; s++;
a=a/10; }m=1;
for(i=1; i<s; i++){
m=m*10;}
cout<<n/m;}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.