问题标题: 送豆

0
0
已解决
杨双瑞
杨双瑞
高级光能
高级光能

无思路。

杨双瑞在2022-11-22 22:37:59追加了内容

#include<iostream>
#include<string>
using namespace std;
string a,b;
int x;
int main()
{
    getline(cin,a);
    b=a.substr(0,3);
    x=a.find(b,3);
    if(x==-1){
        cout<<x;
    }else{
        a.substr(x,3)="cdt";
        cout<<a;
    }
    return 0;   
}

杨双瑞在2022-11-27 09:29:51追加了内容

已解决


0
已采纳
贾若曦
贾若曦
资深天翼
资深天翼

我刚新手

给我豆

0
0
李泽屿
李泽屿
新手启示者
新手启示者

豆给我吧

我超穷的

0
我要回答