Problem Statement | |||||||||||||
You are given an int N. The factorial of N is defined as N*(N-1)*(N-2)*...*1. Compute the factorial of N and remove all of its rightmost zero digits. If the result is more than K digits long, return the last K digits as a string. Otherwise, return the entire result as a string. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | N will be between 1 and 20, inclusive. | ||||||||||||
| - | K will be between 1 and 9, inclusive. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||
| 4) | |||||||||||||
| |||||||||||||
| 5) | |||||||||||||
| |||||||||||||