Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1. import java.io.IOException;
  2. import java.io.InputStream;
  3.  
  4. class n
  5. {
  6.     static int[] a = {-1,32,58,69,78,98,101,109,110,114,116,117,10,};
  7.     static long o = 0x129657b4196a83L;
  8.     static Appendable q;
  9.     static InputStream s;
  10.     static long x;
  11.     static
  12.     {
  13.         q = System.out;
  14.         s = System.in;
  15.     }
  16.     int p;
  17.  
  18.     public static void main(String[]b) throws Throwable
  19.     {
  20.         q.append( Integer.toString( (new n()).p ) );
  21.         q.append((char)a[a.length+a[0]]);
  22.     }
  23.     n() throws Throwable
  24.     {
  25.         p=0;
  26.         try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
  27.         try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
  28.         try{x=o;getValue();}catch(RuntimeException ex){p+=((Int)ex.getCause()).value;}
  29.     }
  30.     int getValue() throws Throwable
  31.     {
  32.         int t,p=0;
  33.         while ( x>0 )
  34.         {
  35.             q.append( (char)a[(int)(x&15L)] );
  36.             x /= 16;
  37.         }
  38.         while ( true )
  39.         {
  40.             t=s.read();
  41.             for ( int i = 0; i < a.length; ++i)
  42.             {
  43.                 if ( t == a[i] && Math.abs(a[i] - i)<=2 )
  44.                 {
  45.                     Int o = new Int();
  46.                     o.value = p;
  47.                     throw new RuntimeException(o);
  48.                 }
  49.             }
  50.             p+=t-'0';
  51.         }
  52.     }
  53.  
  54.     class Int extends Throwable{public int value;}
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement