전체 글 (271) 썸네일형 리스트형 [백준_JAVA] 2720 세탁소 사장 동혁 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); int Q = 25; int D = 10; int N = 5; int P = 1; int C, resultQ, resultD, resultN,resultP; for(int i = 0; i < T; i++) { C = sc.nextInt(); resultQ = C / Q; C %= Q; resultD = C / D; C %= D; resultN = C / N; C %= N; resultP = C / P; System.out.println(result.. [백준_JAVA] 2501 약수 구하기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt(); int count = 0; for(int i = 1; i [백준_JAVA] 10101 삼각형 외우기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == 60 && b == 60 && c == 60) System.out.println("Equilateral"); else if(a+b+c == 180) { if(a == b || b == c || a == c) System.out.println("Isosceles"); else if(a != b || b != c || a != c) System.out.prin.. [백준_JAVA] 2745 진법 변환 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String N = sc.next(); int B = sc.nextInt(); int resultN; double resultB; int result = 0; for(int i = 0; i = '0' && N.charAt(i) [백준_JAVA] 10988 팰린드롬인지 확인하기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int result = 1; String word = sc.next(); for(int i = 0; i < word.length(); i++) { char A = word.charAt(i); char B = word.charAt(word.length()-1-i); if(A != B) result = 0; } System.out.println(result); sc.close(); } } [백준_JAVA] 10811 바구니 뒤집기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N, M, i, j, tmp; N = sc.nextInt(); M = sc.nextInt(); int[] arr = new int[N]; for(int a = 0; a < N; a++) arr[a] = a+1; for(int a = 0; a < M; a++) { i = sc.nextInt()-1; j = sc.nextInt()-1; while(i < j) { tmp = arr[i]; arr[i++] = arr[j]; arr[j--] = tmp; } } for(int a = 0; .. [백준_JAVA] 1546 평균 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); double[] score = new double[N]; double M = 0.0; double cScore = 0.0; double result = 0.0; for(int i = 0; i M) M = score[i]; } for(int i = 0; i < N; i++) { cScore = (score[i]/M)*100; result += cScore; }.. [백준_JAVA] 3052 나머지 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] A = new int[10]; int count = 0; boolean b; for(int i = 0; i < A.length; i++) { A[i] = sc.nextInt() % 42; } for(int i = 0; i < A.length; i++) { b = false; for(int j = i+1; j < A.length; j++) { if(A[i] == A[j]) { b = true; break; } } if(b == false) count++; } System.out.. 이전 1 ··· 11 12 13 14 15 16 17 ··· 34 다음