Algorithm/BOJ

https://www.acmicpc.net/problem/25083 25083번: 새싹 아래 예제와 같이 새싹을 출력하시오. www.acmicpc.net public class bj25083 { public static void main(String[] args) { System.out.println(" ,r'\"7"); System.out.println("r`-_ ,' ,/"); System.out.println(" \\. \". L_r'"); System.out.println(" `~\\/"); System.out.println(" |"); System.out.println(" |"); } }
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 bj9498 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); sc.close(); if(a>=90) System.out.println("A"); else if(a>=80) System.out.println("B"); ..
import java.util.Scanner; public class bj1330 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); if(a>b) { System.out.println(">"); } if(a
https://www.acmicpc.net/problem/2588 2588번: 곱셈 첫째 줄부터 넷째 줄까지 차례대로 (3), (4), (5), (6)에 들어갈 값을 출력한다. www.acmicpc.net 풀이 import java.util.Scanner; public class bj2588 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); System.out.println(a*(b%10)); System.out.println(a*(b/10%10)); System.out.println(a*(b/100%10)); S..
https://www.acmicpc.net/problem/10430 10430번: 나머지 첫째 줄에 A, B, C가 순서대로 주어진다. (2 ≤ A, B, C ≤ 10000) www.acmicpc.net 풀이 import java.util.Scanner; public class bj10430 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); sc.close(); System.out.println((a+b)%c); System.out.println(((a%c) + (b%c))%c); System.o..
https://www.acmicpc.net/problem/10926 10926번: ??! 준하는 사이트에 회원가입을 하다가 joonas라는 아이디가 이미 존재하는 것을 보고 놀랐다. 준하는 놀람을 ??!로 표현한다. 준하가 가입하려고 하는 사이트에 이미 존재하는 아이디가 주어졌을 때 www.acmicpc.net 풀이 import java.util.Scanner; public class bj10926 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); sc.close(); System.out.println(a + "??!"); } }
https://www.acmicpc.net/problem/10869 10869번: 사칙연산 두 자연수 A와 B가 주어진다. 이때, A+B, A-B, A*B, A/B(몫), A%B(나머지)를 출력하는 프로그램을 작성하시오. www.acmicpc.net 풀이 import java.util.Scanner; public class bj10869 { 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); System.out.println(a-b); System.out.println(a*b); System.ou..
https://www.acmicpc.net/problem/1008 1008번: A/B 두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 풀이 import java.util.Scanner; public class bj1008 { public static void main(String[] args) { Scanner in = new Scanner(System.in); double a = in.nextInt(); double b = in.nextInt(); System.out.println(a/b); } }
po3nyo
'Algorithm/BOJ' 카테고리의 글 목록 (2 Page)