forked from Xctrunner/pe_class
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p017.py
63 lines (62 loc) · 1.57 KB
/
p017.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
letter_sum = 0
one = len('one')
letter_sum += (9 * 10 + 100 + 1) * one
two = len('two')
letter_sum += (9 * 10 + 100) * two
three = len('three')
letter_sum += (9 * 10 + 100) * three
four = len('four')
letter_sum += (9 * 10 + 100) * four
five = len('five')
letter_sum += (9 * 10 + 100) * five
six = len('six')
letter_sum += (9 * 10 + 100) * six
seven = len('seven')
letter_sum += (9 * 10 + 100) * seven
eight = len('eight')
letter_sum += (9 * 10 + 100) * eight
nine = len('nine')
letter_sum += (9 * 10 + 100) * nine
ten = len('ten')
letter_sum += 10 * ten
eleven = len('eleven')
letter_sum += 10 * eleven
twelve = len('twelve')
letter_sum += 10 * twelve
thirteen = len('thirteen')
letter_sum += 10 * thirteen
fourteen = len('fourteen')
letter_sum += 10 * fourteen
fifteen = len('fifteen')
letter_sum += 10 * fifteen
sixteen = len('sixteen')
letter_sum += 10 * sixteen
seventeen = len('seventeen')
letter_sum += 10 * seventeen
eighteen = len('eighteen')
letter_sum += 10 * eighteen
nineteen = len('nineteen')
letter_sum += 10 * nineteen
twenty = len('twenty')
letter_sum += 100 * twenty
thirty = len('thirty')
letter_sum += 100 * thirty
forty = len('forty')
letter_sum += 100 * forty
fifty = len('fifty')
letter_sum += 100 * fifty
sixty = len('sixty')
letter_sum += 100 * sixty
seventy = len('seventy')
letter_sum += 100 * seventy
eighty = len('eighty')
letter_sum += 100 * eighty
ninety = len('ninety')
letter_sum += 100 * ninety
hundred = len('hundred')
letter_sum += 9 * 100 * hundred
and_len = len('and')
letter_sum += 9 * 99 * and_len
thousand = len('thousand')
letter_sum += 1 * thousand
print(letter_sum)