题目
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
StringBuffer s = new StringBuffer();
//字符串转为整型数
if(n>0) {
s.append(n);
String ss = s.reverse().toString();
int res = Integer.valueOf(ss);//
System.out.println(res);
}else if(n<0) {
n = -n;
s.append(n);
String ss = s.reverse().toString();
int res = Integer.valueOf(ss);//
System.out.println(-res);
}else {
System.out.println(n);//0
}
}
}