전체 글 (261) 썸네일형 리스트형 [백준] 2480 : 주사위 세 개 JAVA 풀이 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(); int C = in.nextInt(); if(A==B&&B==C){ System.out.println(10000+(1000*A)); } else if(A!=B&&B!=C&&A!=C){ int max = Math.max(A, Math.max(B,C)); System.out.println(100*max); } else{ if(A!=B){ System.out.println(1000+(100*C)); } else if(.. [백준] 2525 : 오븐 시계 JAVA 풀이 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int H = in.nextInt(); int M = in.nextInt(); int time = in.nextInt(); H = H+(M+time)/60; M = (M+time)%60; if(H>23) H = H-24; System.out.println(H+" "+M); } } [백준] 2884 : 알람 시계 JAVA 풀이 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int H = in.nextInt(); int M = in.nextInt(); if(M [백준] 14681 : 사분면 고르기 JAVA 풀이 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int x = in.nextInt(); int y = in.nextInt(); if(x>0){ if(y>0) System.out.println('1'); else System.out.println('4'); } else{ if(y>0) System.out.println('2'); else System.out.println('3'); } } } [백준] 2753 : 윤년 JAVA 풀이 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int year = in.nextInt(); if(year%4==0){ if(year%400==0){ System.out.println('1'); } else if(year%100!=0){ System.out.println('1'); } else{ System.out.println('0'); } } else{ System.out.println('0'); } } } [백준] 9498 : 시험 성적 JAVA 풀이 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int score = in.nextInt(); if(score89){ System.out.println('A'); } else if(score>79){ System.out.println('B'); } else if(score>69){ System.out.println('C'); } else if(score>59){ System.out.println('D'); } else{ System.out.println('F'); } in.close(); } } [백준] 1330 : 두 수 비교하기 JAVA 풀이 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(">"); } else if(A 백준 2588 JAVA 풀이 import java.util.Scanner; public class PrintEx1{ 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%10)); System.out.println(A*((B%100)/10)); System.out.println(A*(B/100)); System.out.println(A*B); } } 이전 1 ··· 28 29 30 31 32 33 다음