ALGORITHM ๐Ÿค–/Baekjoon

๋ฐฑ์ค€
https://www.acmicpc.net/problem/14681 14681๋ฒˆ: ์‚ฌ๋ถ„๋ฉด ๊ณ ๋ฅด๊ธฐ ์  (x, y)์˜ ์‚ฌ๋ถ„๋ฉด ๋ฒˆํ˜ธ(1, 2, 3, 4 ์ค‘ ํ•˜๋‚˜)๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); if (x > 0 && y > 0){ //1์‚ฌ๋ถ„๋ฉด System.out.println("1"); } else if (x 0){ //2์‚ฌ๋ถ„๋ฉด System.out.println("2"); } else..
https://www.acmicpc.net/problem/9498 9498๋ฒˆ: ์‹œํ—˜ ์„ฑ์  ์‹œํ—˜ ์ ์ˆ˜๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ 90 ~ 100์ ์€ A, 80 ~ 89์ ์€ B, 70 ~ 79์ ์€ C, 60 ~ 69์ ์€ D, ๋‚˜๋จธ์ง€ ์ ์ˆ˜๋Š” F๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int A = in.nextInt(); if(A >= 90){ System.out.println("A"); } else if(A >= 80){ System.out.println("B"); } else if..
https://www.acmicpc.net/problem/1330 1330๋ฒˆ: ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ ๋‘ ์ •์ˆ˜ A์™€ B๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, A์™€ B๋ฅผ ๋น„๊ตํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int A = in.nextInt(); int B = in.nextInt(); if(A>B){ System.out.println(">"); // A๊ฐ€ B๋ณด๋‹ค ํฐ ๊ฒฝ์šฐ } else if(A
https://www.acmicpc.net/problem/2753 2753๋ฒˆ: ์œค๋…„ ์—ฐ๋„๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ์œค๋…„์ด๋ฉด 1, ์•„๋‹ˆ๋ฉด 0์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. ์œค๋…„์€ ์—ฐ๋„๊ฐ€ 4์˜ ๋ฐฐ์ˆ˜์ด๋ฉด์„œ, 100์˜ ๋ฐฐ์ˆ˜๊ฐ€ ์•„๋‹ ๋•Œ ๋˜๋Š” 400์˜ ๋ฐฐ์ˆ˜์ผ ๋•Œ์ด๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, 2012๋…„์€ 4์˜ ๋ฐฐ์ˆ˜์ด๋ฉด์„œ www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int year = sc.nextInt(); // ์—ฐ๋„๋ฅผ ์ž…๋ ฅ๋ฐ›์Œ if(year % 4 == 0 && year % 100 != 0){ // 4์˜ ๋ฐฐ์ˆ˜์ด๊ณ  100์˜ ๋ฐฐ์ˆ˜๊ฐ€..
https://www.acmicpc.net/step/1 ์ž…์ถœ๋ ฅ๊ณผ ์‚ฌ์น™์—ฐ์‚ฐ ๋‹จ๊ณ„ ์ž…์ถœ๋ ฅ๊ณผ ์‚ฌ์น™์—ฐ์‚ฐ www.acmicpc.net 10171 ๊ณ ์–‘์ด import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("\\ /\\ "); System.out.println(" ) ( ') "); System.out.println("( / ) "); System.out.println(" \\(__)|"); in.close(); } } 10172 ๊ฐœ import java.util.Scanner; public class Main {..
https://www.acmicpc.net/problem/11382 11382๋ฒˆ: ๊ผฌ๋งˆ ์ •๋ฏผ ์ฒซ ๋ฒˆ์งธ ์ค„์— A, B, C (1 ≤ A, B, C ≤ 1012)์ด ๊ณต๋ฐฑ์„ ์‚ฌ์ด์— ๋‘๊ณ  ์ฃผ์–ด์ง„๋‹ค. www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long A = in.nextLong(); long B = in.nextLong(); long C = in.nextLong(); System.out.println(A+B+C); in.close(); } }
https://www.acmicpc.net/problem/258 2588๋ฒˆ: ๊ณฑ์…ˆ ์ฒซ์งธ ์ค„๋ถ€ํ„ฐ ๋„ท์งธ ์ค„๊นŒ์ง€ ์ฐจ๋ก€๋Œ€๋กœ (3), (4), (5), (6)์— ๋“ค์–ด๊ฐˆ ๊ฐ’์„ ์ถœ๋ ฅํ•œ๋‹ค. www.acmicpc.net import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int A = in.nextInt(); int B = in.nextInt(); System.out.println(A*((B%100)%10)); System.out.println(A*((B%100)/10)); System.out.println(A*(B/100)); System.out.pr..
daxx0ne
'ALGORITHM ๐Ÿค–/Baekjoon' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (9 Page)