アットウィキロゴ

sf01

class pro{
public static void main(String[] args){
int a,b,d;
double r;
int strike;
int t,mode;
int h;
int time;
a=30;
b=80;
mode=0;
strike=0;
time=0;
t=0;
while(mode<100){
r=Math.random();
d=1;
if (r>0.5)d=-1;
a=a+d;
if (a<10)a=10;

r=Math.random();
d=1;
if (r>0.5)d=-1;
b=b+d;
if (b>90)b=90;
if (b<a+10)b=a+10;
System.out.println(strike);
time=time-1;
if (time<0)time=0;
strike=strike+1;
r=Math.random();
h=0;
if (r>0.5)h=h+1;
if (time==0)h=h+1;
if (h==2)strike=a;
if (h==2)time=20;
h=0;
if (strike==b)h=h+1;
if (time>0)h=h+1;
if (h==2)mode=300;

if (t>1000)mode=200;
t=t+1;
}
if (mode==300)System.out.println("Clear");


}
}
最終更新:2010年10月05日 05:39