oops, I meant
10 in base 9
1^2 + 0^2 = 1
a happy number.
On Sep 12, 1:28 pm, cyberfish <[email protected]> wrote:
> 3^2 = 9
> or 1 in base 9.
> happy number.
>
> On Sep 12, 7:28 am, Squall <[email protected]> wrote:
>
> > Input
> > 3
> > 2 3
> > 2 3 7
> > 9 10
>
> > Output
> > Case #1: 3
> > Case #2: 143
> > Case #3: 91
>
> > For case #3, decimal value 91 in base 9 is 111.
> > 111->1+1+1->3
> > How does 3 qualified as "happy number" ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---