题解 | 反向输出一个四位数
反向输出一个四位数
https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0
#include <iostream>
#include <iterator>
#include <string>
using namespace std;
int main() {
std::string a, b;
while (cin >> a) { // 注意 while 处理多个 case
for(auto it = a.rbegin();it != a.rend();++it){
std::cout<<*it;
}
}
// 64 位输出请用 printf("%lld")
}
