반응형
# 1033
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i = sc.nextInt();
String hexString = Integer.toHexString(i).toUpperCase();
System.out.println(hexString);
}
}
# 1034
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int oct = Integer.parseInt(s, 8);
System.out.printf("%d", oct);
}
}
# 1035
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int hexaTmp = Integer.parseInt(s, 16);
String hexa = Integer.toOctalString(hexaTmp);
System.out.printf("%s", hexa);
}
}
# 1036
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char eng = sc.nextLine().charAt(0);
int num = (int)eng;
System.out.println(num);
}
}
# 1037
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
char eng = (char) num;
System.out.println(eng);
}
}
# 1038
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextInt();
double b = sc.nextInt();
System.out.printf("%.0f", a+b);
}
}
# 1039
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
System.out.println(a+b);
}
}
# 1040
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
System.out.println(-a);
}
}
# 1041
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char a = sc.nextLine().charAt(0);
System.out.println((char)(a+1));
}
}
# 1042
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a / b);
}
}
반응형
'개인 공부 > JAVA' 카테고리의 다른 글
[JAVA] Code Up 기초 100제 (1063 ~ 1072) (0) | 2021.06.23 |
---|---|
[JAVA] Code Up 기초 100제 (1053 ~ 1062) (0) | 2021.06.22 |
[JAVA] Code Up 기초 100제 (1043 ~ 1052) (0) | 2021.06.21 |
[JAVA] Code Up 기초 100제 (1023 ~ 1032) (0) | 2021.06.19 |
[JAVA] Code Up 기초 100제 (1001 ~ 1011) (0) | 2021.06.18 |