본문 바로가기

IT개발자

(29)
백준 11022번 A+B -8 JAVA(자바) 문제풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); for(int i=1; i
백준 25304번 영수증 JAVA(자바) 문제풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int total = scan.nextInt(); int count = scan.nextInt(); int temp = 0; for(int i = 0; i< count; i++) { int price = scan.nextInt(); int num = scan.nextInt(); temp += price*num; } if((total-temp) == 0) { System.out.println("Yes"); }else { System.out.println("No"); } } }
백준 2480번 주사위 세개 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int f = scan.nextInt(); int s = scan.nextInt(); int t = scan.nextInt(); int total = 0; if(f == s && f == t) { total = 10000 + (f*1000); }else if(f == s) { total = 1000 + (f*100); }else if(f == t) { total = 1000 + (f*100); }else if(s == t) { total = 1000 + (s*100); }else i..
백준 3003번 킹, 퀸, 룩, 비숍, 나이트, 폰 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int chessKing = 1; int chessQueen = 1; int chessLook = 2; int chessBishop = 2; int chessKnight = 2; int chessPawn = 8; int king = scan.nextInt(); int queen = scan.nextInt(); int look = scan.nextInt(); int bishop = scan.nextInt(); int Knight = scan.nextInt(); int pawn = sc..
백준 11021번 A+B - 7 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); for(int i=1; i
백준 2742번 기찍 N JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); scan.close(); for(int i=A; i>0; i--) { System.out.println(i); } } }
백준 2741번 N 찍기 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); scan.close(); for(int i=1; i
백준 8393번 합 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); scan.close(); int B = 0; for(int i=0; i
백준 2739번 구구단 JAVA(자바) 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); for(int i=1; i
백준 25083번 새싹 JAVA(자바) 문제 풀이 public class Main { 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(" |"); } }