Chữ số tận cùng khác 0

View as PDF

Submit solution


Points: 0.19 (partial)
Time limit: 0.38s
Memory limit: 256M
Input: stdin
Output: stdout

Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

Cho số tự nhiên ~n~ (~n\le 10^9~). Hãy tìm chữ số tận cùng khác ~0~ của ~n!~.

Input

Dòng duy nhất ghi số ~n~.

Output

Gồm 1 dòng duy nhất ghi kết quả tìm được.

Sample Input

5

Sample Output

2

Comments

Please read the guidelines before commenting.



  • -31
    tiendat0604  commented on Sept. 30, 2021, 1:12 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.