Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
548 B
0
Indexable
Never
/**
 * 
 */
package LuyenCode;

import java.util.*;

/**
 * @author Linh Tran Bao
 * @since Jul 29, 2021
 */
public class VL18 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in); 
		
		String str = sc.next(); //1230
		StringBuilder bd = new StringBuilder(str); 
		StringBuilder res = bd.reverse(); //0321

		while(res.charAt(0) == '0') { 
			res.delete(0, 1);
		} 
		if(res.charAt(res.length()-1) == '-') { 
			res.delete(res.length()-1, res.length());
		}
		System.out.println(res);
	}
}