목록해답 (90)
삐까냥의 파도타기
문제 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV6c6bgaIuoDFAXy&categoryId=AV6c6bgaIuoDFAXy&categoryType=CODE 실제 업무를 수행하듯이 코드를 그대로 구현했습니다.다만 시간을 1씩 증가하여 구현한것은 효율적이지 못해서다음 수행해야할 시간을 계산하여 다음 시간으로 건너띄게 구현했습니다. 정답률이 약 50%정도인걸 보면 난이도는 쉬운편이네요.실제로 알고리즘 함정은 없었으며,문제대로 구현 가능한가를 판가름하기 위한 문제입니다. import java.util.LinkedList;import java.util.Scanner; public class Solu..
문제 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV2gbY0qAAQBBAS0 import java.util.Scanner; public class Solution{ public static void main(String[] args) {Scanner sc = new Scanner(System.in);int num = sc.nextInt();for ( int i = num; i >= 0; i-- ) {System.out.print(i + " ");}}} 가볍게 제출 방식을 알아보기 위한 손가락 풀기~
문제 출처 : https://www.acmicpc.net/problem/9996 import java.util.Scanner; public class Q9996 { static String[] search;static boolean same;public static void main(String[] args) {Scanner sc = new Scanner(System.in);int num = sc.nextInt();search = sc.next().split("\\*");for ( int i = 0; i < num; i++ ) {System.out.println(split(sc.next()));}}public static String split(String input) {if ( search[0].len..
문제 출처 : https://www.acmicpc.net/problem/9933 import java.util.HashSet;import java.util.Scanner; public class Q9933 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);int num = sc.nextInt();HashSet list = new HashSet();for ( int i = 0; i < num; i++ ) {String temp = sc.next();String reverse = new StringBuffer(temp).reverse().toString();if ( list.contains(reverse) || temp..
문제 출처 : https://www.acmicpc.net/problem/9935import java.util.Scanner; public class Q9935 { static char[] chars;static String boom;public static void main(String[] args) {Scanner sc = new Scanner(System.in);String string = sc.nextLine();boom = sc.nextLine();chars = new char[string.length()];char lastChar = boom.charAt(boom.length()-1);int nowPoint = 0;for ( int i = 0; i < string.length(); i++ ) {..
문제 출처 : https://www.acmicpc.net/problem/1764 import java.util.Collections;import java.util.HashSet;import java.util.LinkedList;import java.util.Scanner; public class Q1764 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);int noListen = sc.nextInt();int noSee = sc.nextInt();HashSet noListenList = new HashSet();for ( int i = 0; i < noListen; i++ ) {noListenList.add(sc...
문제 출처 : https://www.acmicpc.net/problem/2941 import java.util.Scanner; public class Q1475 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);String string = sc.nextLine();string = string.replaceAll("dz=", "a");string = string.replaceAll("lj", "a");string = string.replaceAll("nj", "a");string = string.replaceAll("c-", "a");string = string.replaceAll("d-", "a");string = ..
문제 출처 : https://www.acmicpc.net/problem/2743 import java.util.Scanner; public class Q2743 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);System.out.println(sc.next().length());}}
문제 출처 : https://www.acmicpc.net/problem/1032 import java.util.Scanner; public class Q1032 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);int num = sc.nextInt();char[] chars = sc.next().toCharArray();for ( int i = 1; i < num; i++ ) {String temp = sc.next();for ( int j = 0; j < chars.length; j++ ) {if ( chars[j] != temp.charAt(j) ) {chars[j] = '?';}}}System.out.print..
문제 출처 : https://www.acmicpc.net/problem/10808 import java.util.Scanner; public class Q10808 { public static void main(String[] args) {Scanner sc = new Scanner(System.in);String string = sc.nextLine();int[] alphabet = new int[26];for ( int i = 0; i < string.length(); i++ ) {int temp = Integer.valueOf(string.charAt(i)) - 97;alphabet[temp]++;}for ( int i = 0; i < 26; i++ ) {System.out.print(alphabe..