LouisCK's blog

By LouisCK, 6 years ago, In English,

Here's my solution for this problem -- Football. It involves printing stuff to the screen and I don't know why its failing the time limit.

 
 
 
 
  • Vote: I like it
  • -1
  • Vote: I do not like it

»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Ok, I got the solution. Writing out to the screen with System.out.println() has a high overhead. Anyone facing this problem should use StringBuilder first to build the solution and then print it out in one go.