//递归
public class Main {
public static void main(String[] args)
{
func(2,0,9,"0");
func(2,1,20,"1");
}
static void func(int n,int judge,int sum ,String res)
{//题数 对错 得分 结果
if(n==11)
{
if(sum == 100)
{
System.out.println(res);
}
return;
}
func(n+1,0,sum-n,res+"0");
func(n+1,1,sum*2,res+"1");
}
}
08-14