fork download
  1. public class Main {
  2. public static void main(String[] args) {
  3. long start = System.currentTimeMillis();
  4. String s = new String(new char[1_000_000]);
  5. while (!s.isEmpty()) {
  6. s = s.substring(1);
  7. }
  8. System.out.println(System.currentTimeMillis() - start);
  9. }
  10. }
  11.  
Time limit exceeded #stdin #stdout 15s 380160KB
stdin
Standard input is empty
stdout
Standard output is empty