题解 | 23年OPPO-a的翻转
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
cin >> a;
string b_str = to_string(a);
reverse(b_str.begin(), b_str.end());
int b = stoi(b_str);
cout << a + b << endl;
}
// 64 位输出请用 printf("%lld")
查看12道真题和解析