Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149637 徐英杰 15加到第几项 C++ Wrong Answer 1 MS 264 KB 795 2026-03-15 13:52:47

Tests(0/1):


Code:

#include <iostream> #include <stack> using namespace std; stack<char> st; int main() { /* for (循环变量初始化;循环条件;循环变量的改变) { // 满足循环条件才会执行 if(){ continue;//跳过当前这一次循环 //... } //..... } 循环变量初始化; while (循环条件) { // 满足循环条件才会执行 while(){ if(){ break;//终止最近的整个循环 } } 循环变量的改变; } */ int i = 1; int s = 0; while (true) { s += i; i++; if (s > 1000) { cout<<i; break; // cout<<s; } } }


Run Info:

------Input------
0
------Answer-----
45
------Your output-----
46