https://www.dotcpp.com/oj/problem1572.html
import java.util.Scanner;
public class Main {
@SuppressWarnings("resource")
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int num = Integer.valueOf(s, 16);
System.out.println(Integer.toString(num, 16).toUpperCase() + " " + Integer.toString(num, 10) + " "
+ Integer.toString(num, 8));
}
}
#include<stdio.h>
int main()
{
int s;
scanf("%x",&s);
printf("%X %d %o",s,s,s);
return 0;
}