GO Solution For UVa 107 - The Cat in the Hat. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

(An homage to Theodore Seuss Geisel)

The Cat in the Hat is a nasty creature, But the striped hat he is wearing has a rather nifty feature. With one flick of his wrist he pops his top off. Do you know what’s inside that Cat’s hat? A bunch of small cats, each with its own striped hat. Each little cat

...

You can find the full details of the problem The Cat in the Hat at UVa Online Judge

Sample Input

216 125
5764801 1679616
0 0

Sample Output

31 671
335923 30275911

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

Solution originally posted at: Github by @codingsince1985