The input comes from standard in. Try this:

Scanner scanner = new Scanner(System.in);

You don't have to modify your code to test offline, if you're testing from
a commandline. Something like:

java Solution < a.samplein

...will do the trick.

On Mon, Feb 17, 2020 at 8:41 AM Ujwal Joshi <[email protected]>
wrote:

> I use scanner and file classes in Java to read the files, so I put in the
> name of the file in the scanner class. But in the practice problems for
> Code Jam (2019 competition), it didn't tell me what the input file was
> going to be called, or where it is stored. How do I read the input files
> for code jam problems?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/1f03d050-d9a4-40d7-8aa2-3d127ea6b6ef%40googlegroups.com
> <https://groups.google.com/d/msgid/google-code/1f03d050-d9a4-40d7-8aa2-3d127ea6b6ef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAHaiWHPz7Y_zhPpRJGKY4yd0oGntfSFTE%2ByRgHWLNKfuHStDOg%40mail.gmail.com.

Reply via email to