Advertisement
CR7CR7

Alpha Cipher

May 5th, 2022
711
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. number_one=int(input())
  2. number_two=int(input())
  3. number_three=int(input())
  4. number_four=int(input())
  5. number_five=int(input())
  6. #If the result consists of more than 1 digit, take only the last digit of the produced number.
  7. a = number_one //100
  8. b = number_one //10%10
  9. c=number_one%10
  10. first_symbol=a*b*c
  11.  
  12. if first_symbol>10:
  13.     sr_0=str(first_symbol)
  14.     d_0=int(sr_0[len(sr_0)-1])
  15. else:
  16.     d_0=first_symbol
  17.  
  18. x = number_two //100
  19. y = number_two //10%10
  20. z=number_two%10
  21. second_symbol=x*y*z
  22.  
  23. if second_symbol > 10:
  24.     sr = str(second_symbol)
  25.     d = int(sr[len(sr) -1])
  26. else:
  27.     d=second_symbol
  28.    
  29. e = number_three//100
  30. f= number_three//10%10
  31. g=number_three%10
  32. third_symbol=e*f*g
  33.  
  34. if third_symbol > 10:
  35.     sr_2=str(third_symbol)
  36.     d_2=int(sr_2[len(sr_2)-1])
  37. else:
  38.     d_2=third_symbol
  39.  
  40. h = number_four//100
  41. i= number_four//10%10
  42. j=number_four%10
  43. four_symbol=h*i*j
  44.  
  45. if four_symbol > 10:
  46.     sr_3=str(four_symbol)
  47.     d_3=int(sr_3[len(sr_3)-1])
  48. else:
  49.     d_3=four_symbol
  50.  
  51. k = number_five//100
  52. l= number_five//10%10
  53. m=number_five%10
  54. five_symbol=k*l*m
  55.  
  56. if five_symbol > 10:
  57.     sr_4=str(five_symbol)
  58.     d_4=int(sr_4[len(sr_4)-1])
  59. else:
  60.     d_4=five_symbol
  61.    
  62.  
  63.  
  64.    
  65. print(str(d_0)+str(d)+str(d_2)+str(d_3)+str(d_4))
Advertisement
RAW Paste Data Copied
Advertisement