一、题目内容
二、题解
解法1:
思路
代码
public class Solution {public int reverse (int x) {// write code herelong ans = 0;while(x!=0){int c = x%10;ans = ans*10+c;x/=10;}if(ans>Integer.MAX_VALUE || ans<Integer.MIN_VALUE){return 0;}return (int)ans;}}
让时间为你证明