project_python/2.2_lesson.13.20.py

18 lines
900 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

****Задание 10 Параграф 2.2***
***Три числа были даны эльфам, семь — гномам, а девять достались человеческому роду.
Но все они были обмануты... Потому что существовало ещё одно число. В стране Нумия, на бумаге из тёмного папируса, властелин Зерон тайно записал Единую Цифру, подчиняющую себе все великие числа.
Давайте выясним, что это за цифра!***
if name == "main":
elves = int(input())
dwarfs = int(input())
humans = int(input())
if elves // 10 == dwarfs // 10 == humans // 10:
print(elves // 10)
elif elves % 10 == dwarfs % 10 == humans % 10:
print(elves % 10)
else:
print('NO')