只能参数分解
/// <summary>
/// 分解参数
/// </summary>
/// <param name="num"></param>
protected void GetParams(int num)
{
while (paraNum > 0)
{
if (num == 0)
{
paraNum = 0;
return;
}
if (num == 1)
{
this.paraslst.Add(1);
paraNum = 0;
return;
}
if (num >= Math.Pow(2, paraNum))
{
paraslst.Add(Convert.ToInt32(Math.Pow(2, paraNum).ToString()));
GetParams(num - Convert.ToInt32(Math.Pow(2, paraNum).ToString()));
}
paraNum--;
}
}