A
Aldric Giacomoni
Here's the problem:
https://www.spoj.pl/problems/PROBTNPO/
It's pretty trivial, but it doesn't have a well-delimited "end" to it.
In the forums, they indicate one should test for end of file. I have no
idea how to do that in Ruby.
I mean - I paste my code in a box, tell it to run and then they tell me
if it worked or not.
I can only suppose they're using the "-i" argument ... If so, how do I
test for when that file has run out of stuff?
https://www.spoj.pl/problems/PROBTNPO/
It's pretty trivial, but it doesn't have a well-delimited "end" to it.
In the forums, they indicate one should test for end of file. I have no
idea how to do that in Ruby.
I mean - I paste my code in a box, tell it to run and then they tell me
if it worked or not.
I can only suppose they're using the "-i" argument ... If so, how do I
test for when that file has run out of stuff?