전체 글 (56) 썸네일형 리스트형 백준 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.. 이전 1 2 3 4 ··· 19 다음