int ReverseInterage(int Num) { long long tmp = 0; for (; Num; Num /= 10) tmp = tmp * 10 + Num % 10; return (tmp <= INT_MAX && tmp >= INT_MIN) ? tmp : 0; }
整数的翻转
时间: 2024-10-17 20:17:41
int ReverseInterage(int Num) { long long tmp = 0; for (; Num; Num /= 10) tmp = tmp * 10 + Num % 10; return (tmp <= INT_MAX && tmp >= INT_MIN) ? tmp : 0; }
整数的翻转