1 solutions
-
5
#include<bits/stdc++.h> using namespace std; const int N=510; char s[N]; int main() { cin.getline(s,N); int n=strlen(s); for(int i=0;i<n;i++) { if(s[i]==' ') { cout<<" "; continue; } int j=i+1; while(j<n&&s[j]!=' ') j++; j--; for(int k=j;k>=i;k--) { cout<<s[k]; } i=j; } return 0; }
- 1
Information
- ID
- 922
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 71
- Accepted
- 27
- Uploaded By