- Today
- Total
목록Java (46)
Codemental

문제 제출답안 (2022.07.19) import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int num = Integer.parseInt(br.readLine()); for(int i = 0 ; i

문제 참고) https://jhnyang.tistory.com/92 [Java 자바 입출력] BufferedReader/BufferedWriter [자바 입출력 함수] BufferedReader / BufferWriter BufferedReader/BufferedWriter은 이름처럼 버퍼를 이용해서 읽고 쓰는 함수입니다. 이 함수는 버퍼를 이용하기 때문에 이 함수를 이용하면 입출력의 효율이.. jhnyang.tistory.com 제출답안 (2022.07.18) import java.io.*; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader b..

문제 제출답안 (2022.07.16) import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); for(int i = 0 ; i

문제 제출답안 (2022.07.14) import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); for(int i = 1 ; i

문제 제출답안 (2022.07.13) import java.util.*; public class Main { public static void main(String[] args) { List list = new ArrayList(); Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int result = 0; for(int i = 0; i < num ; i++) { list.add(sc.next()); } for(int i = 0; i < num; i ++) { if(countGroupWord(list.get(i))) { result++; } } sc.close(); System.out.println(result); } public static..

문제 제출답안 (2022.07.12) import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); System.out.println(topFrequent(str)); } public static String topFrequent(String str) { if(str.length() == 1) return str.toUpperCase(); Map map = new HashMap(); List[] list = new List[str.length()]; for(int i = 0 ; i < str.length(); i++..

문제 제출답안 (2022.07.10) import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); int res = (int)str.toCharArray()[0]; System.out.println(res); } } 채점결과 (2022.07.10)

문제 제출답안 (2022.07.07) import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int M = sc.nextInt(); if(0 > H || H> 23 || 0 > M || M > 59) { return; } if(M == 45) { M = 0; }else if(M < 45) { H = (H-1); M = (60+M)-45; }else { M = M-45; } if(H