GO Solution For UVa 10497 - Sweet Child Makes Trouble. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Children are always sweet but they can sometimes make you feel bitter. In this problem, you will see how Tintin, a five year’s old boy, creates trouble for his parents. Tintin is a joyful boy and is always busy in doing something. But what he does is not always pleasant for his parents. He likes mos

...

You can find the full details of the problem Sweet Child Makes Trouble at UVa Online Judge

Sample Input

2
3
4
-1

Sample Output

1
2
9

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985