기초 100제

개인 공부/JAVA

[JAVA] Code Up 기초 100제 (1053 ~ 1062)

# 1053 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); if (a == 0) { System.out.println(1); } else if (a == 1) { System.out.println(0); } } } # 1054 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.nextIn..

개인 공부/JAVA

[JAVA] Code Up 기초 100제 (1043 ~ 1052)

# 1043 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); } } # 1044 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long result = (long)N + 1; System.out.println(resul..

개인 공부/JAVA

[JAVA] Code Up 기초 100제 (1033 ~ 1042)

# 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 ..

개인 공부/JAVA

[JAVA] Code Up 기초 100제 (1023 ~ 1032)

# 1023 import java.util.Scanner; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String num = sc.nextLine(); StringTokenizer token = new StringTokenizer(num, "."); int[] nums = new int[2]; int i = 0; while (token.hasMoreTokens()) { nums[i] = Integer.parseInt(token.nextToken()); i += 1; } String front = String.for..

내캉
'기초 100제' 태그의 글 목록