问题标题: 酷町堂:7805 求子串

0
0
已解决
沈昊冉
沈昊冉
修练者
修练者

#include <iostream>

#include <string>

using namespace std;

int main(){

string s;

int x,y;

cin>>s;

cin>>x>>y;

cout<<s.substr(x,y);

return 0;

}

代码那错了,大佬帮看看


0
0
孔巳辰
孔巳辰
中级守护
中级守护

c o u t< < s . s u b s t r ( x - 1 , y - x + 1 )

我要回答