2 solutions
-
-1
#include<bits/stdc++.h> using namespace std; int main(){ char s[105], a[105]; int b = 0; cin >> s; int slen = strlen(s); for(int i = slen- 1; i >= 0; i--){ if(s[i - 1] == '.'){ a[b] = s[i]; break; } else{ a[b] = s[i]; b++; } } int alen = strlen(a); for(int i = alen - 1 ; i >= 0; i--){ cout << a[i]; } return 0; }
- 1
Information
- ID
- 1053
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- (None)
- # Submissions
- 310
- Accepted
- 51
- Uploaded By