标签:int etc ever res public turn tco return pre
class Solution { public: int reverse(int x) { int res = 0; while (x != 0) { int t = res * 10 + x % 10; if (t / 10 != res) return 0; res = t; x /= 10; } return res; } };
标签:int etc ever res public turn tco return pre
原文地址:http://www.cnblogs.com/wangkun1993/p/6358537.html