728x90 반응형 알고리즘138 [백준]11720_숫자의 합★ next() 는 문자 혹은 문자열을 공백 기준으로 한 단어 또는 한 문자씩 입력을 받는다. nextLine()의 경우에는 문자 혹은 엔터를 치기 전까지의 문장 전체를 입력받는다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N .. 2022. 2. 15. [백준]10951_A+B - 4 1234567891011121314151617181920import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; String str = ""; while ((str = br.readLine()) != null) { st = new Str.. 2022. 2. 15. [백준]10953_A+B - 6 12345678910111213141516171819202122import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuffer sb = new StringBuffer(); StringTokenizer st; int T = Integer.parseInt(br.. 2022. 2. 15. [백준]11718_그대로 출력하기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = ""; while ((str = br.readLine()) != null) { System.out.println(st.. 2022. 2. 15. [백준]11022_A+B - 8 123456789101112131415161718192021222324252627import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.IOException;import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuffer sb = new StringBuffer(); StringTokenizer st; int sum=0; int T .. 2022. 2. 15. [백준]11021_A+B - 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuffer sb = new StringBuffer(); StringTokeniz.. 2022. 2. 14. [백준]10952_A+B - 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; String str; while (true) { st = new Stri.. 2022. 2. 14. [백준]2557_A+B - 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int T = Integer.p.. 2022. 2. 14. [백준]2558_A+B - 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int A=Integer.parseInt(br.readLine()); int B=Integer.parseInt(br.readLine()); System.out.pri.. 2022. 2. 14. 이전 1 ··· 8 9 10 11 12 13 14 ··· 16 다음 728x90 반응형