Untitled

mail@pastecode.io avatar
unknown
python
7 months ago
1.2 kB
2
Indexable
Never
str = input()

first_char = str[0]

a = 0

if first_char == 'A':
    a += 1
elif first_char == 'B':
    a += 10
elif first_char == 'C':
    a += 19
elif first_char == 'D':
    a += 28
elif first_char == 'E':
    a += 37
elif first_char == 'F':
    a += 46
elif first_char == 'G':
    a += 55
elif first_char == 'H':
    a += 64
elif first_char == 'I':
    a += 39
elif first_char == 'J':
    a += 73
elif first_char == 'K':
    a += 82
elif first_char == 'L':
    a += 2
elif first_char == 'M':
    a += 11
elif first_char == 'N':
    a += 20
elif first_char == 'O':
    a += 48
elif first_char == 'P':
    a += 29
elif first_char == 'Q':
    a += 38   
elif first_char == 'R':
    a += 47  
elif first_char == 'S':
    a += 56
elif first_char == 'T':
    a += 65
elif first_char == 'U':
    a += 74
elif first_char == 'V':
    a += 83
elif first_char == 'W':
    a += 21
elif first_char == 'X':
    a += 3
elif first_char == 'Y':
    a += 12
elif first_char == 'Z':
    a += 30
    
for i in range(1,9):
    a += (int)(str[i])*(9-i)

a += (int)(str[9])

if a % 10 == 0:
    print("real")
else:
    print("fake")
    
Leave a Comment