← Samsung questions
CodingReported in a candidate post, Sep 2020

Find Last Digit of a^b for Large Numbers

Filed under Samsung

Given two large integers a and b (1 <= a, b <= 2^64), find the last digit of a^b. The result should be equivalent to (a^b) % 10.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.