Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
313543 黄浙峰老师 【C5-6】字符串操作 C++ 通过 100 1 MS 256 KB 324 2025-03-22 14:08:45

Tests(2/2):


#include <iostream> #include <algorithm> #include <string> using namespace std; int main(){ string s,b; int n,t; cin>>s>>n>>b; int l=s.size(); if(l>100) cout<<100<<endl; else cout<<l<<endl; s=s.insert(n-1,b); cout<<s<<endl; reverse(s.begin(),s.end()); t=s.find("x")+1; cout<<t; return 0; }


测评信息: