求助,能不能看一下循环哪里错了

P5731 【深基5.习6】蛇形方阵

@[wang126179](/user/786844) ```while(b<=n*n)```因改成```while(b<n*n)```
by Sad_Rex @ 2022-10-13 09:57:06


@[wang126179](/user/786844) 就AC
by Sad_Rex @ 2022-10-13 09:58:21


@[wang126179](/user/786844) 发现卡在了`while`的应该结束的时候
by _Jonny_404 @ 2022-10-13 09:58:56


@[wang126179](/user/786844) 主要是`b`到了`n*n`以后等于`n*n`,一直在`while`里,四面八方都被填满了,就一直陷在`while`里面。
by _Jonny_404 @ 2022-10-13 10:02:37


@[wang126179](/user/786844) 改成`while(b<n*n)`的话了,填完了`n*n`次就会跳出去
by _Jonny_404 @ 2022-10-13 10:03:41


`改成while(b<n*n)的话了,填完了n*n次就会跳出去`中的`了`是打错了
by _Jonny_404 @ 2022-10-13 10:04:43


@[chengjonghao111](/user/662037) @[1bigRex_zkr](/user/704234) 谢谢大佬了
by wang126179 @ 2022-10-13 12:05:59


|