fork(43) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. public class Main {
  8. public static void main(String[] args) {
  9. int N = 77777777;
  10. long t;
  11.  
  12. {
  13. t = System.currentTimeMillis();
  14. for (int i = N; i --> 0 ;) {
  15. sb.append("");
  16. }
  17. System.out.println(System.currentTimeMillis() - t);
  18. }
  19.  
  20. {
  21. StringBuilder sb = new StringBuilder();
  22. t = System.currentTimeMillis();
  23. for (int i = N; i --> 0 ;) {
  24. sb.append("");
  25. }
  26. System.out.println(System.currentTimeMillis() - t);
  27. }
  28. }
  29. }
Success #stdin #stdout 4.53s 380224KB
stdin
Standard input is empty
stdout
2798
1673