SHARE
TWEET

Untitled

a guest Jun 24th, 2014 29 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Main {
  5.     class $R {
  6.         InputStream in; byte b; byte[] buf; int bi, bz;
  7.         $R(InputStream I) { in=I; buf=new byte[65536]; bi=bz=0; read(); }
  8.         void skip() { while (b >= 0 && b <= 32) read(); }
  9.         void read() {
  10.             if (bi==bz) {
  11.                 bi=0; try { bz=in.read(buf); } catch(Exception e) { bz=-1; } }
  12.             b = bz == -1 ? -1 : buf[bi++];  }
  13.  
  14.         int nextInt() {
  15.             int i=0; boolean s=false; skip();
  16.             if (b == '-') { s=true; read(); }
  17.             for (; b > 32; read()) i = i*10 + b-48; return s ? -i : i; }
  18.     }
  19.     class $W extends PrintWriter {
  20.         $W() { super(new BufferedOutputStream(System.out)); }
  21.     }
  22.  
  23.     void run() {
  24.         $R $r = new $R(System.in);
  25.         $W $w = new $W();
  26.  
  27.         int n = 0;
  28.         while ( ( n = $r.nextInt() ) != 0 ) {
  29.             int result = 42;  // insert your logic here
  30.  
  31.             $w.println("f91(" + n + ") = " + result );
  32.         }
  33.  
  34.         $w.close();
  35.     }
  36.     public static void main ( String[] args ) {
  37.         new Main().run();
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top