Ad
  • Custom User Avatar

    Time: 1682ms

    Golang version seems to be fine for me. You are not supposed to calculate the actual value of the factorial. Inputs go up to n=1000000000, and even with bigint, calculating it will take forever.

    I am going to close this as not a kata issue, because my Golang solution which uses exactly the same approach I used in other languages passed.

  • Custom User Avatar

    Also,

    strings.Split(s, " ") is equvalent to string.Fields(s)

  • Custom User Avatar

    I'd say the proper way is:

    import "unicode/utf8"
    
    utf8.RuneCountInString()
    

    Seen this on Go blog.
    Cheers :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution