Skip to content

lastfactorialdigit

bradendubois edited this page Nov 8, 2021 · 7 revisions

Last Factorial Digit

ID: lastfactorialdigit

Difficulty: 1.5

CPU Time: 1 second

Memory: 1024 MB

Solution

A basic for-loop or helper function can be used to calculate N!, but doing modulo division by 10 either way will get the last digit of that result.

Clone this wiki locally