Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
109137 江婉儿 删数问题 C++ 解答错误 0 0 MS 244 KB 346 2023-11-06 13:36:37

Tests(0/9):


#include<bits/stdc++.h> #include<cmath> using namespace std; int main() { int s; char n[100]; cin>>n>>s; for(int a=1;a<=s;) { for(int b=0;b<strlen(n);b++) { if(n[b]>n[b+1]) { //cout<<n[b]<<" "; for(int c=b;c<strlen(n)-1;c++) { n[b]=n[b+1]; } a++; break; } } } cout<<n; }


测评信息: