9 solutions
-
1
#include<bits/stdc++.h> using namespace std; void revShow(char s[], int len)//逆向输出字符数组s,s长度为len { if(len == 0) return; cout << s[len-1]; revShow(s, len-1); } int main() { char s[1005]; cin.getline(s, 1005); int len = strlen(s); s[--len] = '\0';//去掉最后的'!' revShow(s, len); return 0; }
-
1
#include <set> #include <ios> #include <list> #include <cmath> #include <ctime> #include <queue> #include <deque> #include <stack> #include <vector> #include <bitset> #include <cctype> #include <cerrno> #include <cwchar> #include <cstdio> #include <fenv.h> #include <iosfwd> #include <string> #include <limits> #include <math.h> #include <cstdlib> #include <iomanip> #include <clocale> #include <complex> #include <cstring> #include <cstring> #include <cwctype> #include <istream> #include <ostream> #include <sstream> #include <fstream> #include <utility> #include <stdio.h> #include <iostream> #include <stdint.h> #include <string.h> #include <tgmath.h> #include <complex.h> #include <algorithm> #include <exception> #include <stdbool.h> #include <stdexcept> #include <streambuf> #include <functional> #include <inttypes.h> #include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; for(int i = s.size() - 1;i >= 0;i--){ if(s[i] == '!') continue; cout << s[i]; } return 0; }`
- 1
Information
- ID
- 648
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 82
- Accepted
- 46
- Uploaded By