Skip to content

Instantly share code, notes, and snippets.

@kunishi
Created October 8, 2015 02:32
Show Gist options
  • Save kunishi/34897733ed4b879b9c48 to your computer and use it in GitHub Desktop.
Save kunishi/34897733ed4b879b9c48 to your computer and use it in GitHub Desktop.
// @JUDGE_ID: 26089N problem_no Java ""
import java.io.*;
import java.util.*;
class Main {
static String readLn(int max) {
byte lin[] = new byte[max];
int l = 0;
int car = -1;
String line = "";
try {
while (l < max) {
car = System.in.read();
if ((car < 0) || (car == '\n'))
break;
lin[l ++] += car;
}
} catch (IOException e) {
return null;
}
if ((car < 0) && (l == 0))
return null;
return (new String(lin, 0, l));
}
public static void main(String args) {
Main mywork = new Main();
myWork.begin();
}
void begin() {
String input;
StringTokenizer idata;
while ((input = Main.readLn(255)) != null) {
idata = new StringTokenizer(input);
// processing input data
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment