We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Do not use bufio.Scanner to read the input lines as the later test cases will consist of lines with >10000 numbers and lead to "token too long" errors. Use bufio.Reader instead.
Took me a while to figure this out as the later test cases don't show your output and bufio.Scanner is just simpler to use IMO
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
Important note for folks attempting this in Go:
Do not use bufio.Scanner to read the input lines as the later test cases will consist of lines with >10000 numbers and lead to "token too long" errors. Use bufio.Reader instead.
Took me a while to figure this out as the later test cases don't show your output and bufio.Scanner is just simpler to use IMO