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..
ALGORITHM ๐ค/Baekjoon
๋ฐฑ์ค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..