daily pastebin goal
25%
SHARE
TWEET

Timer

a guest Sep 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.        String ans = "";
  3.        long y = 0;
  4.        long start = System.currentTimeMillis();
  5.        for (int x = 100000; x <=1200000; x+=100000)
  6.            
  7.        {
  8.        for (long i = y; i <= x; i++)
  9.            System.out.println(i);
  10.        
  11.        }
  12.        
  13.        y+= 100000;
  14.            
  15.       long end = System.currentTimeMillis();
  16.       String temp = Long.toString(end - start);
  17.       ans= ans + " " + temp;
  18.    
  19.    
  20.       System.out.println("it took = " + (ans));
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
 
Top