3 solutions

  • 4
    @ 2025-3-23 13:32:35
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	string s;
    	int n,k;
    	cin>>s>>n>>k;
    	cout<<s.substr(n,k);
    	return 0;
    }
    
    • 1
      @ 2026-11-8 10:12:05

      冰冰冰

      #include<bits/stdc++.h>
      using namespace std;
      int main(){
      
      	int k,k2;
          string s;
          cin>>s>>k>>k2;
          for(int i=k;i<k+k2;i++){
              cout<<s[i];
          }
          
      	return 0;
      }
      
      • -5
        @ 2025-1-18 16:29:07
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        	string s;
        	int n,k;
        	cin>>s>>n>>k;
        	cout<<s.substr(n,k);
        	return 0;
        }
        • 1

        Information

        ID
        99
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        74
        Accepted
        53
        Uploaded By