Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
13176 | hu | 字符串逆序 | C++ | Accepted | 0 MS | 256 KB | 262 | 2023-03-31 11:15:53 |
#include<bits/stdc++.h> using namespace std; int cnt = 0, yu; void f(string s, int index) { if(index == -1) return; cout << s[index]; f(s, index - 1); } int main() { string s; cin >> s; int len = s.size(); f(s, len - 2); return 0; }