declare @i int ,@sum int ,@j int,@K int select @i=1 select @sum=0 declare @tmpSum int select @k=0 while @sum<=10000 begin select @k=@k+1 select @i=@k*2-1 select @j=1 select @tmpSum=1 while @j<=@i begin select @tmpSum=@tmpSum*@j select @j=@j+1 end select @sum=@sum+@tmpSum end print(@sum) print(@i)
温馨提示:内容为网友见解,仅供参考