2 solutions

  • 0
    @ 2026-11-7 20:28:17
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        string n;
        cin>>n;
        int a,b;
        cin>>a>>b;
        n.erase(a,b);
        cout<<n;
        return 0;
    }
    
    
    • -2
      @ 2024-9-11 20:02:06
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	string n;
      	int pos,k;
      	cin>>n;
      	cin>>pos>>k;
      	n.erase(pos,k);
      	cout<<n;
      	return 0;
      }
      
      
      
      • 1

      Information

      ID
      103
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      73
      Accepted
      52
      Uploaded By