29 lines
657 B
Python
29 lines
657 B
Python
# #zadachya s biletom
|
||
bilet_num = list(int(value) for value in input())
|
||
Sum = 0
|
||
Sum_1 = 0
|
||
for num in bilet_num[:3]:
|
||
Sum = Sum + num
|
||
for num in bilet_num[3:]:
|
||
Sum_1 = Sum_1 + num
|
||
if Sum == Sum_1:
|
||
print ("Счастливый")
|
||
else:
|
||
print("Обычный")
|
||
|
||
# другой вариант / задача с билетом
|
||
bilet_num = [int(value) for value in input()]
|
||
Sum = 0
|
||
Sum2 = 0
|
||
for num in bilet_num:
|
||
Sum += (int(str(num)[0:3]))
|
||
print (num)
|
||
for num in bilet_num:
|
||
print (num)
|
||
Sum2 += (int(str(num)[3:]))
|
||
if Sum == Sum2:
|
||
print('Счастливый')
|
||
else:
|
||
print ('Обычный')
|
||
|
||
|