Re: Seeing the same flop
Here's the code, for anyone intersted:
<font class="small">Code:</font><hr /><pre>
public class Test {
public static void main(String[] args) {
double f = 22100;
double ans =2;
double lastTerm = (f-1D)/f;
while (true) {
lastTerm *= (f-ans)/f;
if ( (1-lastTerm) > .5)
break;
ans++;
}
System.out.println(ans);
}
}
</pre><hr />
|