//一个整数反转的最短代码
int reverse(int x){
int res=0;
while(x) {
res = res*10 + x%10;
x /= 10;
}
return res;
}
一个整数反转的最短代码
最新推荐文章于 2024-01-24 18:40:59 发布
//一个整数反转的最短代码
int reverse(int x){
int res=0;
while(x) {
res = res*10 + x%10;
x /= 10;
}
return res;
}