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; }
相關文章
相關標籤/搜索