Back to Problem Solutions forum
I wrote a code, which works in a WinStudio. But it doesn't work correctly in the site's window. If I'm waiting for 16 answers, it gives me 10 answers. Or 11, if I'm waiting for 19 answers. Or 13... I know about rules, I cannot post my code, but I don't know, how I can solve this task.
I cannot post my code
Not that it is strictly forbidden, but simply not needed - your code is visible for everyone who solved this task, accessible from your profile page:
However, it would be much easier if you give an example of input data along with expected answer and your answer,
otherwise it is bit hard to tell which input these 16
or 10
are about.
By the way, your code is printing every answer on separate line. Problem checker expects them simply to be delimited with spaces.
P.S. I think I got what you meant. Your code gives less answers than you expect simply because it times out.
Your solution is quite slow (sorry) because it subtracts every "second" while printers are working.
If you want you can calculate result in your WinStudio and copy-paste it into the answer to submit. However, of course, you may prefer to find faster (more proper) solution :)
Thank you. I'll try to change my solution.