GoLang Solution For UVa Online Judge: 10162 - Last Digit
GO Solution For UVa 10162 - Last Digit. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.
Give you a integer number N (1 ≤ n ≤ 2 ∗ 10100). Please compute
S = 11 + 22 + 33 + . . .+NN
Give the last digit of S to me.
Input Input file consists of several N ’s, each N a line. It is ended with N = 0.
Output For each N give a line containing only one digit, which is the last digit of S.
You can find the full details of the problem Last Digit at UVa Online Judge
1 2 3 0
1 5 2
Solution: Please check the main.go snippet for the solution.
Solution originally posted at: Github by @codingsince1985