Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.io.InputStream;
- class n
- {
- static int[] a = {-1,32,58,69,78,98,101,109,110,114,116,117,10,};
- static long o = 0x129657b4196a83L;
- static Appendable q;
- static InputStream s;
- static long x;
- static
- {
- q = System.out;
- s = System.in;
- }
- int p;
- public static void main(String[]b) throws Throwable
- {
- q.append( Integer.toString( (new n()).p ) );
- q.append((char)a[a.length+a[0]]);
- }
- n() throws Throwable
- {
- p=0;
- try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
- try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
- try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
- }
- int getValue() throws Throwable
- {
- int t,p=0;
- while ( x>0 )
- {
- q.append( (char)a[(int)(x&15L)] );
- x /= 16;
- }
- while ( true )
- {
- t=s.read();
- for ( int i = 0; i < a.length; ++i)
- {
- if ( t == a[i] && Math.abs(a[i] - i)<=2 )
- {
- Int o = new Int();
- o.value = p;
- throw new RuntimeException(o);
- }
- }
- p+=t-'0';
- }
- }
- class Int extends Throwable{public int value;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement