Advertisement
zxvcbngbfvcxz

Untitled

Dec 5th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import hashlib
  2. import math
  3.  
  4. test = input()
  5.  
  6. if test[len(test) - 1].isalpha():
  7. test = test + test[len(test)-1].upper()
  8.  
  9. elif test[len(test) - 1].isdigit():
  10. num = int(test[len(test)-1])
  11. append_num = math.factorial(num) + math.factorial(pow(num, 2) - 2) - num * 2;
  12. test = test + str(append_num)
  13.  
  14. testWithSha = hashlib.sha1(test.encode('utf-8')).hexdigest()
  15. print(testWithSha)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement