| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149638 | 徐英杰 | 15加到第几项 | C++ | Accepted | 1 MS | 260 KB | 804 | 2026-03-15 13:53:16 |
#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; if (s > 1000) { cout<<i; break; // cout<<s; } i++; } }