Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_one=int(input())
- number_two=int(input())
- number_three=int(input())
- number_four=int(input())
- number_five=int(input())
- #If the result consists of more than 1 digit, take only the last digit of the produced number.
- a = number_one //100
- b = number_one //10%10
- c=number_one%10
- first_symbol=a*b*c
- if first_symbol>10:
- sr_0=str(first_symbol)
- d_0=int(sr_0[len(sr_0)-1])
- else:
- d_0=first_symbol
- x = number_two //100
- y = number_two //10%10
- z=number_two%10
- second_symbol=x*y*z
- if second_symbol > 10:
- sr = str(second_symbol)
- d = int(sr[len(sr) -1])
- else:
- d=second_symbol
- e = number_three//100
- f= number_three//10%10
- g=number_three%10
- third_symbol=e*f*g
- if third_symbol > 10:
- sr_2=str(third_symbol)
- d_2=int(sr_2[len(sr_2)-1])
- else:
- d_2=third_symbol
- h = number_four//100
- i= number_four//10%10
- j=number_four%10
- four_symbol=h*i*j
- if four_symbol > 10:
- sr_3=str(four_symbol)
- d_3=int(sr_3[len(sr_3)-1])
- else:
- d_3=four_symbol
- k = number_five//100
- l= number_five//10%10
- m=number_five%10
- five_symbol=k*l*m
- if five_symbol > 10:
- sr_4=str(five_symbol)
- d_4=int(sr_4[len(sr_4)-1])
- else:
- d_4=five_symbol
- print(str(d_0)+str(d)+str(d_2)+str(d_3)+str(d_4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement