生理周期java实现
import java.util.Scanner;
//生理周期
public class S2 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int p,e,i,d;
int ncase=0;
while(sc.hasNext()) {
p=sc.nextInt();
e=sc.nextInt();
i=sc.nextInt();
d=sc.nextInt();
ncase++;
int k;
for(k=d+1;(k-p)%23!=0;++k);
for(;(k-e)%28!=0;k+=23);
for(;(k-i)%33!=0;k+=23*28);
int m=k-d;
System.out.println("第"+ncase+"个实例:"+m);
}
}
}