LeetCode——反转整数

int reverse(int x) { int i=0; while (x!=0) { int n=i*10+x%10; x=x/10; if(n/10!=i)return 0; i=n; } return i; }
相关文章
相关标签/搜索