- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
def checkio(number):
str_num = ""
lst = list(str(number))
if len(lst) == 1:
str_num = FIRST_TEN[int(lst[0])-1]
if len(lst) == 2:
if int(lst[0]) == 1:
str_num = SECOND_TEN[int(lst[1])]
elif int(lst[0]) > 1:
if int(lst[1]) == 0:
str_num = OTHER_TENS[int(lst[0]) - 2]
elif int(lst[1]) > 0:
str_num = OTHER_TENS[int(lst[0]) - 2] + ' ' + FIRST_TEN[int(lst[1])-1]
if len(lst) == 3:
if int(lst[1]) == 0:
if int(lst[2]) == 0:
str_num = FIRST_TEN[int(lst[0])-1] + ' ' + HUNDRED
elif int(lst[2]) > 0:
str_num = FIRST_TEN[int(lst[0])-1] + ' ' + HUNDRED + ' ' + FIRST_TEN[int(lst[2])-1]
elif int(lst[1]) == 1:
str_num = FIRST_TEN[int(lst[0])-1] + ' ' + HUNDRED + ' ' + SECOND_TEN[int(lst[2])]
elif int(lst[1]) > 1:
if int(lst[2]) == 0:
str_num = FIRST_TEN[int(lst[0])-1] + ' ' + HUNDRED + ' ' + OTHER_TENS[int(lst[1]) - 2]
elif int(lst[2]) > 0:
str_num = FIRST_TEN[int(lst[0])-1] + ' ' + HUNDRED + ' ' + OTHER_TENS[int(lst[1]) - 2] + ' ' + FIRST_TEN[int(lst[2])-1]
Lure Of Chaos 17.09.2015 17:13 # 0
другие тяны