본문 바로가기

PS231

[백준 31822] 재수강 [Python] 문제국민대학교에서는 수강 신청, 성적 조회 등 과목의 구분이 필요할 때 ’과목 코드’를 사용한다. 과목 코드는 10자리로 이루어져 있으며, 7번째 자리는 영어 알파벳 대문자 또는 숫자, 8번째 자리는 하이픈(-), 나머지 자리는 숫자로 이루어져 있다.당신은 망한 학점을 복구하기 위해 재수강을 해야 하는데, 재수강을 하기 위해서는 재수강할 과목과 과목코드의 앞 5자리가 일치하는 과목을 수강해야 한다. 재수강할 과목의 과목 코드와 수강 신청 가능한 과목 목록이 주어지면, 재수강으로 인정되는 과목이 몇 개가 있는지 출력하라.입력첫 번째 줄에 재수강할 과목의 과목 코드가 주어진다.두 번째 줄에 수강 신청 가능한 과목의 개수 𝑁이 주어진다. (1≤𝑁≤16) 그다음 𝑁개의 줄에 걸쳐 수강 신청 가능한 과목의 .. 2024. 7. 6.
[HackerRank] Weather Observation Station 4 [MySQL] 풀이 STATION 테이블의 전체 CITY 항목에서 고유한 CITY의 갯수를 제외한 값을 출력해야 한다.소스코드보기출처 Weather Observation Station 4 | HackerRankFind the number of duplicate CITY names in STATION.www.hackerrank.com 2024. 7. 5.
[백준 05753] Pascal Library [Python] 문제Pascal University, one of the oldest in the country, needs to renovate its Library Building, because after all these centuries the building started to show the effects of supporting the weight of the enormous amount of books it houses.To help in the renovation, the Alumni Association of the University decided to organize a series of fund-raising dinners, for which all alumni were invited. Thes.. 2024. 7. 5.
[HackerRank] Weather Observation Station 3 [MySQL] 풀이STATION테이블에서 ID가 짝수인 행에 대해 CITY를 출력하면 된다.중복된 CITY가 없도록 해야 하므로 결과에 DISTINCT를 붙여주자.소스코드보기출처 Weather Observation Station 3 | HackerRankQuery a list of unique CITY names with even ID numbers.www.hackerrank.com 2024. 7. 5.
[백준 05751] Head or Tail [Python] 문제John and Mary have been friends since nursery school. Since then, they have shared a playful routine: every time they meet, they play Head or Tail with a coin, and whoever wins has the privilege of deciding what they are going to play during the day. Mary always choose Head, and John always choose Tail.Nowadays they are in college, but continue being truly good friends. Whenever they meet, the.. 2024. 7. 5.
[HackerRank] Weather Observation Station 1 [MySQL] 풀이STATION 테이블에서 모든 행의 CITY와 STATE 속성을 출력하면 된다.소스코드보기출처 Weather Observation Station 1 | HackerRankWrite a query to print the CITY and STATE for each attribute in the STATION table.www.hackerrank.com 2024. 7. 4.