Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import math
- # Auto-generated code below aims at helping you parse
- # the standard input according to the problem statement.
- n = int(input())
- p = int(input())
- # Write an action using print
- # To debug: print("Debug messages...", file=sys.stderr)
- last = n%10
- for _ in range(p-1):
- last = last*n%10
- print(last, file=sys.stderr)
- print(last)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement