https://www.acmicpc.net/problem/5635 import java.io.*;import java.time.LocalDate;import java.util.*;public class Main { static int N; static List people = new ArrayList(); static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ..
백준
https://www.acmicpc.net/problem/9093 import java.io.*;import java.util.*;public class Main { static int N; static StringBuffer sb = new StringBuffer(); static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st..
https://www.acmicpc.net/problem/19532 import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int D = sc.nextInt(); int E = sc.nextInt(); int F = sc.nextInt(); // ax + by = c // dx + ey = f /..
https://www.acmicpc.net/problem/10824 입력 조건이 1이상 100만 이하 이길래 int로 했었는데, 1,000,000 + 1,000,000 = 10,000,001,000,000 가 되어 int 타입의 범위를 넘게 되어 NumberFormat 예외가 터졌었다. 그리고 처음엔 내 스스로 푼게 264ms 나왔고, 블로그 참고해서 푼 게 124ms 나왔다. 첫 번째 풀이 import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int ..
https://www.acmicpc.net/problem/2935 import java.math.BigInteger;import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger A = new BigInteger(sc.next()); String op = sc.next(); BigInteger B = new BigInteger(sc.next()); System.out.println(op.equals("*") ? A.multiply(B) : A.add(B)); ..
https://www.acmicpc.net/problem/9506 import java.io.*;import java.util.*;public class Main { static int stoi(String s) { return Integer.parseInt(s); } static int N; static StringBuilder sb = new StringBuilder(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while (true) { ..
https://www.acmicpc.net/problem/10811 import java.io.*;import java.util.*;public class Main { static int stoi(String s) { return Integer.parseInt(s); } static int N, M; static int[] arr; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenize..
https://www.acmicpc.net/problem/2953 import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List chefList = new ArrayList(); for (int i = 1; i System.out.println(chef.num + " " + chef.totalScore)); } static class Chef implements Comparable { int num, totalScore; public Chef(int num, int t..
https://www.acmicpc.net/problem/8979 import java.io.*;import java.util.*;public class Main { static int stoi(String s) { return Integer.parseInt(s); } static int N, K; static int answerIdx; static List countryList = new ArrayList(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in))..