본문 바로가기

전체 글124

백준 - 2739번 구구단 [자바] 문제풀이 import java.util.Scanner; public class Bj_2739 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); for(int i=1;i 2022. 10. 10.
백준 - 2480번 주사위 세개 [자바] 문제풀이 import java.util.Scanner; public class Bj_2480 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a,b,c,max; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); if(a==b&&b==c&&a==c) { System.out.println(10000+(a*1000)); } else if(a!=b && b!=c && c!=a) { max = (a>b)?((a>c)?a:c):((b>c)?b:c); System.out.println(max * 100); } else if(a==b||a==c){ System.out.pr.. 2022. 10. 10.
백준 - 2525번 오븐 시계 [자바] import java.util.Scanner; public class Bj_2525 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int m = sc.nextInt(); int c = sc.nextInt(); h += c/60; m += c%60; if(m>=60) { h += 1;// m 이 60 이상이면 h 에 1 추가 m = m%60; } if(h>=24) { h = h%24;// h 가 24 이상이면 24로 나눈 나머지를 h 로 대입 } System.out.println(h+" "+m); } } 2022. 10. 10.
국비 - 1006 ( response , page context , 액션태그) * response 내장객체 response 는 서버가 클라이언트에게 요청에 대한 응답을 보내기 위한 객체이다 내장 객체 response 의 자료 유형인 HttpServletResponse 는 상위 인터페이스로 ServletResponse를 가지며 다음과 같은 메서드를 가지고 있다. 반환값 메서드 사용용도 void addCookie(Cookie cookie) 쿠키 데이터 기록 void addHeader(String name,String value) response 헤더 내용기록 void sendRedirect(String location) 지정된 location 페이지로 이동 void setBufferSize(int size) 버퍼크기 지정 void setContentType(String type) Co.. 2022. 10. 6.