classSolution { public: intreverse(intx) { inty=0; while (x!=0) { if (y>214748364||y<-214748364) return0; y=y*10+x%10; x=x/10; } returny; } };
classSolution { public: intreverse(intx) { inty=0; while (x!=0) { if (y>214748364||y<-214748364) return0; y=y*10+x%10; x=x/10; } returny; } };