That's how we used to do it when I competed in ACM using Java, but I think
the Scanner class is probably what's most used now. Check out
go-hero.net/jam and look for Java solutions to Code Jam problems, and you
should be able to find some good ones.
On Mar 31, 2014 10:26 AM, "wonjun" <[email protected]> wrote:
> Hey guys,
>
> I normally submit my programs in Python, but for this time I'd like to do
> a mix of both Python and Java. I wonder if this is a good way to do it:
>
>
> import java.io.*;
>
> public class Pogo {
> public String solve(int x, int y)
> {
> .....
> // returns the answer...
> }
> public static void main(String[] args) throws IOException
> {
> Pogo p = new Pogo();
> BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
> int T = Integer.parseInt(in.readLine());
> for(int i = 0; i < T; i++)
> {
> // Give output...
> }
> }
>
> }
>
>
> Is there a better way to do it?
>
> And, how do I do I/O in eclipse? I normally write code in there and test
> my code - and use my terminal after saving it elsewhere. Its frustrating.
> (since I don't know how to do it there in eclipse)
>
>
> Thanks in advance.
>
> --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/CAA0%2BsYtnJ-poeDwQmZC4F8BodqeuOt5Mc7WDuhj_jq3ntKqRTg%40mail.gmail.com<https://groups.google.com/d/msgid/google-code/CAA0%2BsYtnJ-poeDwQmZC4F8BodqeuOt5Mc7WDuhj_jq3ntKqRTg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/CAHaiWHPRGXRVieA0Z8LbtK9v5bAB0TYhQ1XOjx2%3DYmz9j8r61A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.