fork download
  1. importPackage(java.io);
  2. importPackage(java.lang);
  3.  
  4. var reader = new BufferedReader( new InputStreamReader(System['in']) );
  5.  
  6. while(true) {
  7. var line = reader.readLine();
  8. if(line == null || line == "42") {
  9. break;
  10. } else {
  11. System.out.println(line);
  12. }
  13. }
Success #stdin #stdout 0.45s 41636KB
stdin
1
2
10
42
11
stdout
1
2
10