fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone {
  9. public static void main (String[] args) throws java.lang.Exception {
  10. new Thread(new HashCodeGenerator()).start();
  11. }
  12.  
  13. private static class HashCodeGenerator implements Runnable {
  14. @Override
  15. public void run() {
  16. for (int i = 0; i < 10; i++) {
  17. final String uuid = UUID.randomUUID().toString();
  18. final int stringHash = uuid.hashCode();
  19. final int mod = Math.abs(stringHash % 100);
  20. System.out.println(uuid + " : " + mod);
  21. }
  22. }
  23. }
  24. }
Time limit exceeded #stdin #stdout 5s 38340KB
stdin
Standard input is empty
stdout
Standard output is empty