/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int minimum=10;
int maximum=25;
int randomNum;
int less=0,more=0, inside =0;
for(int i =0 ;i<10000000;i++){
randomNum
= minimum
+ (int)(Math.
random() * (maximum
- minimum
)); if(randomNum < minimum)
less++;
else if(randomNum >maximum)
more++;
else
inside++;
}
System.
out.
println("less = " + less
); System.
out.
println("more = " + more
); System.
out.
println("inside = " + inside
);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWludCBtaW5pbXVtPTEwOwoJCWludCBtYXhpbXVtPTI1OwoJCWludCByYW5kb21OdW07CgkJaW50IGxlc3M9MCxtb3JlPTAsIGluc2lkZSA9MDsKCQlmb3IoaW50IGkgPTAgO2k8MTAwMDAwMDA7aSsrKXsKCQkJcmFuZG9tTnVtID0gbWluaW11bSArIChpbnQpKE1hdGgucmFuZG9tKCkgKiAobWF4aW11bSAtIG1pbmltdW0pKTsKCQkJaWYocmFuZG9tTnVtIDwgbWluaW11bSkKCQkJCWxlc3MrKzsKCQkJZWxzZSBpZihyYW5kb21OdW0gPm1heGltdW0pCgkJCQltb3JlKys7CgkJCWVsc2UgCgkJCQlpbnNpZGUrKzsKCQl9CgkJU3lzdGVtLm91dC5wcmludGxuKCJsZXNzID0gIiArIGxlc3MpOwoJCVN5c3RlbS5vdXQucHJpbnRsbigibW9yZSA9ICIgKyBtb3JlKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oImluc2lkZSA9ICIgKyBpbnNpZGUpOwoKCX0KfQ==