标签:turn ret eve bsp tmp while res rev ever
输入: 123 输出: 321
输入: -123 输出: -321
int reverse(int x) { int res = 0; while(x) { int tmp = x%10; x/=10; res = res * 10 + tmp; } return res; }
标签:turn ret eve bsp tmp while res rev ever
原文地址:https://www.cnblogs.com/didiaoxiaoguai/p/10876921.html