class Test1
{
public static void sop(Object obj)
{
System.out.println(obj);
}
public static void main(String[] args)
{
sop(get());
}
public static int get()
{
int x = 10,y = 1,sum = 0;
//判断钱数是否满足,150是攒不够的
while (sum!=100)
{
//判断是否为周日
if(! (y%7==0))
{
sum = sum+x;
}
//周日
if (y%7==0)
{
sum = (sum+20)/2;
}
y++;
}
return y;
}
} |