KOREATECH 1003: 0을 만들자 - Small Link : judge.koreatech.ac.kr/problem.php?id=1003 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 from sys import stdin data_length = int(stdin.readline().strip()) data_arr = [int(data) for data in stdin.readline().strip().split(' ')] data_arr.sort() counter = 0 save_result = dict() for idx, target in enumerate(data_arr[0:-1]): target *= -1 s = id.. 2020. 12. 8. 1107: 실습시험 연습문제 - 모음 문자 수 Link : http://judge.koreatech.ac.kr/problem.php?id=1107 1. 문제 주어진 문자열의 모음 문자들의 총 몇 개 있는지 출력하시오. 예를 들어 문자열이 "apple"이면 a, e가 각각 한 번씩 등장하므로 2가 출력되어야 합니다. 문자열의 길이는 0부터 1,000이하이며, 모두 영문자 소문자로만 구성되어 있다. 2. 문제의 조건 0 2020. 12. 8. KOREATECH 1107: 실습시험 연습문제 - 모음 문자 수 Link : judge.koreatech.ac.kr/problem.php?id=1107 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 from sys import stdin quest_cnt = int(stdin.readline().strip()) vowel = ['a', 'i', 'e', 'o', 'u'] for _ in range(quest_cnt): data = [s for s in stdin.readline().strip()] counter = 0 for s in data: if s in vowel: counter+=1 print(counter) cs cjw.git@gmail.com 2020. 12. 8. 이전 1 ··· 31 32 33 34 다음