Advertisement
poulhoi

Jenkins

Sep 27th, 2022
883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. public class Jenkins {
  6.     public static void main(String[] args) {
  7.         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  8.         int ch;
  9.         int hash = 0;
  10.         try {
  11.             while(true) {
  12.                 ch = br.read();
  13.                 if(ch == -1) break;
  14.                 hash += ch;
  15.                 hash += hash << 10;
  16.                 hash ^= hash >>> 6;
  17.             }
  18.             hash += hash << 3;
  19.             hash ^= hash >>> 11;
  20.             hash += hash << 15;
  21.             br.close();
  22.         } catch (IOException e) {
  23.             e.printStackTrace();
  24.         }
  25.         System.out.println(Integer.toUnsignedString(hash, 16));
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement