Last Digit of a^b
Medium
Series & Closed-Form Math
Print the last decimal digit of a raised to the power b.
Constraints
0 <= a <= 10^18 0 <= b <= 10^18
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.