코딩테스트

    [백준][python]1157. 단어공부

    문제 알파벳 대소문자로 된 단어가 주어지면, 이 단어에서 가장 많이 사용된 알파벳이 무엇인지 알아내는 프로그램을 작성하시오. 단, 대문자와 소문자를 구분하지 않는다. 입력 첫째 줄에 알파벳 대소문자로 이루어진 단어가 주어진다. 주어지는 단어의 길이는 1,000,000을 넘지 않는다. 출력 첫째 줄에 이 단어에서 가장 많이 사용된 알파벳을 대문자로 출력한다. 단, 가장 많이 사용된 알파벳이 여러 개 존재하는 경우에는 ?를 출력한다. 예제 입력 1 복사 Mississipi 예제 출력 1 복사 ? 예제 입력 2 복사 zZa 예제 출력 2 복사 Z My answer ans = [0]*26 s=input() for idx,i in enumerate(s): n=ord(i) if n 1: print('?') else..

    [백준][python] 2675. 문자열 반복

    문제 문자열 S를 입력받은 후에, 각 문자를 R번 반복해 새 문자열 P를 만든 후 출력하는 프로그램을 작성하시오. 즉, 첫 번째 문자를 R번 반복하고, 두 번째 문자를 R번 반복하는 식으로 P를 만들면 된다. S에는 QR Code "alphanumeric" 문자만 들어있다. QR Code "alphanumeric" 문자는 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\$%*+-./: 이다. 입력 첫째 줄에 테스트 케이스의 개수 T(1 ≤ T ≤ 1,000)가 주어진다. 각 테스트 케이스는 반복 횟수 R(1 ≤ R ≤ 8), 문자열 S가 공백으로 구분되어 주어진다. S의 길이는 적어도 1이며, 20글자를 넘지 않는다. 출력 각 테스트 케이스에 대해 P를 출력한다. 예제 입력 1 복사 2..

    [백준][python]10809. 알파벳 찾기

    문제 알파벳 소문자로만 이루어진 단어 S가 주어진다. 각각의 알파벳에 대해서, 단어에 포함되어 있는 경우에는 처음 등장하는 위치를, 포함되어 있지 않은 경우에는 -1을 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 단어 S가 주어진다. 단어의 길이는 100을 넘지 않으며, 알파벳 소문자로만 이루어져 있다. 출력 각각의 알파벳에 대해서, a가 처음 등장하는 위치, b가 처음 등장하는 위치, ... z가 처음 등장하는 위치를 공백으로 구분해서 출력한다. 만약, 어떤 알파벳이 단어에 포함되어 있지 않다면 -1을 출력한다. 단어의 첫 번째 글자는 0번째 위치이고, 두 번째 글자는 1번째 위치이다. 예제 입력 1 복사 baekjoon 예제 출력 1 복사 1 0 -1 -1 2 -1 -1 -1 -1 4 3 -1 -..

    [프로그래머스][python]두 개 뽑아서 더하기

    Question: 정수 배열 numbers가 주어집니다. numbers에서 서로 다른 인덱스에 있는 두 개의 수를 뽑아 더해서 만들 수 있는 모든 수를 배열에 오름차순으로 담아 return 하도록 solution 함수를 완성해주세요. 제한사항 numbers의 길이는 2 이상 100 이하입니다. numbers의 모든 수는 0 이상 100 이하입니다. Example: My answer: def solution(numbers): answer = [] for i in range(len(numbers)): for j in range(i+1,len(numbers)): answer.append(numbers[i]+numbers[j]) answer = list(set(answer)) answer.sort() retur..

    [프로그래머스][python] 12912. 두 정수 사이의 합

    programmers.co.kr/learn/courses/30/lessons/12912?language=python3 코딩테스트 연습 - 두 정수 사이의 합 두 정수 a, b가 주어졌을 때 a와 b 사이에 속한 모든 정수의 합을 리턴하는 함수, solution을 완성하세요. 예를 들어 a = 3, b = 5인 경우, 3 + 4 + 5 = 12이므로 12를 리턴합니다. 제한 조건 a와 b가 같은 경우 programmers.co.kr Question: 두 정수 a, b가 주어졌을 때 a와 b 사이에 속한 모든 정수의 합을 리턴하는 함수, solution을 완성하세요. 예를 들어 a = 3, b = 5인 경우, 3 + 4 + 5 = 12이므로 12를 리턴합니다. 제한사항 a와 b가 같은 경우는 둘 중 아무 수..

    [codesignal][python] 10. Sort by Height

    codesignal.com Coding Tests and Assessments for Technical Hiring | CodeSignal Learn how you can go beyond resumes in technical hiring with a state-of-the-art assessment platform and advanced coding tests codesignal.com level : easy Question: Some people are standing in a row in a park. There are trees between them which cannot be moved. Your task is to rearrange the people by their heights in a ..

    [codesignal][python] 9. isLucky

    codesignal.com Coding Tests and Assessments for Technical Hiring | CodeSignal Learn how you can go beyond resumes in technical hiring with a state-of-the-art assessment platform and advanced coding tests codesignal.com level : easy Question: Ticket numbers usually consist of an even number of digits. A ticket number is considered lucky if the sum of the first half of the digits is equal to the s..

    [codesignal][python] 8. commonCharacterCount

    codesignal.com Coding Tests and Assessments for Technical Hiring | CodeSignal Learn how you can go beyond resumes in technical hiring with a state-of-the-art assessment platform and advanced coding tests codesignal.com level : easy Question: Given two strings, find the number of common characters between them. 두 string이 주어지면 서로 같은 겹치는 요소의 개수를 반환하는 문제 Example: For s1 = "aabcc" and s2 = "adcaa", t..

    [codesignal][python] 7. AllLongestStrings

    codesignal.com Coding Tests and Assessments for Technical Hiring | CodeSignal Learn how you can go beyond resumes in technical hiring with a state-of-the-art assessment platform and advanced coding tests codesignal.com level : easy Question: Given an array of strings, return another array containing all of its longest strings. Example: For inputArray = ["aba", "aa", "ad", "vcd", "aba"], the outp..

    [REF] 코딩 테스트 공부 계획

    다양한 플렛폼의 기본 문제들 풀어보기 하루 5문제씩 꾸준하게! 코드시그널*** 코드업*** 해커랭크 코딜리티 리트코드*** (easy, medium) 프로그래머스 코드포스 백준 codeforces.com/ Codeforces codeforces.com codeup.kr/problemsetsol.php?psid=23 문제집 / 기초 100제 codeup.kr codeup.kr/ CodeUp ☆ 파이썬 다운로드 : 파이썬3 ☆ 무료 C언어 IDE : Code::blocks DEV C++ ☆ 추천 온라인 IDE : C++11 Python3 Java ☆ 채점 가능 언어 : C, C++, JAVA, Python 3.5 ★ C++로 제출시 void main()을 사용하면 컴 codeup.kr programmers...