大佬们,帮看看是什么问题。结果显示time error,时间错误?谢谢诸位!

P1151 子数整数

@[CYF123469](/user/803133) 你确定 RE 是 time error???
by Sprague_Garundy @ 2022-09-27 22:35:08


@[Sprague_Garundy](/user/764746) 确定,还是说本弱弱的代码就是有问题?
by CYF123469 @ 2022-09-27 22:37:59


绷不住了。
by Sprague_Garundy @ 2022-09-27 22:42:40


@[Sprague_Garundy](/user/764746) 你就直说吧
by CYF123469 @ 2022-09-27 22:45:27


绷不住了+10086
by lxplxplxplxp @ 2022-10-23 11:49:54


你在while里把i的值修改了 外部for循环里i也会变 看看这段代码输出就明白了 ``` #include<iostream> using namespace std; int main() { for(int i=0;i<10;i++) { if(i%2) i+=1; cout<<i; } return 0; } ```
by lxplxplxplxp @ 2022-10-23 11:51:26


|