Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
ABR0067V - Сүүлийн цифр |
n натурал тоо өгөгдөв (n ≤ 2000). Сүүлчийн цифрийг ол.
Input
n натурал тоо өгөгдөнө
Output
уг тооны сүүлийн цифрийг хэвлэнэ
Example
Input:
1961
Output:
1
Нэмсэн: | sw40 |
Огноо: | 2007-10-24 |
Хугацааны хязгаарлалт: | 1s |
Эх кодын хэмжээний хязгаарлалт: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Програмчлалын хэлүүд: | ADA95 ASM32 GAWK BASH BF C CSHARP CPP C99 CLPS CLOJURE LISP sbcl LISP clisp D FSHARP FORTRAN GO HASK ICON ICK JAVA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYTHON3 RUBY SCALA SCM guile SCM qobi SED ST TCL TEXT WHITESPACE |
Эх сурвалж: | Абрамов С. А. |
hide comments
|
|||||
2020-09-22 13:31:51
import math x = input() x = int(x) if x <= 2000 : print(x % 10) else : print() |
|||||
2013-04-22 09:03:49 tedy
|
|||||
2013-01-26 09:24:42 ConquesT/T
DEV-C++ bish ada deer ajiluulaad hed nj udaa aldjihvdaa tsu2 |
|||||
2012-10-12 13:37:52 Tso .
#include <stdio.h> main(){ int n; n=n%10; printf("%d", n); return 0; } Last edit: 2012-11-24 03:03:35 |
|||||
2012-10-12 13:12:51 Kris
Hariu ni garaad bga murtluu buruu ged baih uym yahuu |
|||||
2012-01-04 10:54:53 AiR-Stark (DMTS) 10c
lol |
|||||
2011-12-07 07:53:19 cs10d021
N.CS10D021 davka˜™˜ Last edit: 2011-12-07 07:53:54 |
|||||
2011-05-13 14:30:06 brutallmetal
#include <stdio.h> #include <math.h> #include <stdlib.h> main(){ int n, i = 1; scanf("%d", &n); for(i; i < n; i++){ n=n%10; } printf("%d", n); system("pause"); return 0; } |
|||||
2010-12-31 09:00:30 dsn
#include<stdio.h> #include<stdlib.h> #include<math.h> int main () { int a; scanf("%d", &a); if(a==100) printf("1\n"); else printf(0); { if(a>9) printf("%d", a%10); else printf(0) ; } system("pause"); return 0; } zuv shuu manaahaaan |
|||||
2009-10-26 08:27:07 sw09d245
fxtusyr |