Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class IntIO extends BufferedInputStream
- {
- public IntIO(final InputStream in)
- {
- super(in);
- }
- public IntIO(final InputStream in, final int buf_size)
- {
- super(in, buf_size);
- }
- public int getInt() throws IOException
- {
- int chr = read();
- while(chr<=' ') chr = read();
- int sum = chr-'0';
- while((chr = read())>' ') sum = (sum<<3)+sum+sum + chr-'0';
- return sum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement