Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package percolation;
  2.  
  3. import edu.princeton.cs.algs4.StdIn;
  4. import edu.princeton.cs.algs4.StdOut;
  5. import edu.princeton.cs.algs4.Stopwatch;
  6.  
  7. public class PercolationTester {
  8. public static void main(String[] args) {
  9. int N = StdIn.readInt();
  10. int T = StdIn.readInt();
  11. Stopwatch stopwatch = new Stopwatch();
  12. PercolationStats ps = new PercolationStats(N, T);
  13.  
  14. StdOut.println("Running time: " + stopwatch.elapsedTime() + " seconds.");
  15. StdOut.println("mean() = " + ps.mean());
  16. StdOut.println("stddev() = " + ps.stddev());
  17. StdOut.println("confidenceLow() = " + ps.confidenceLow());
  18. StdOut.println("confidenceHigh() = " + ps.confidenceHigh());
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement