1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from collections import deque
vowel=['a','e','i','o','u']
while 1:
s=input()
if s=='#' : break
tmp=deque()
for i in s: tmp.append(i)
if vowel not in tmp:
print(s+"ay")
else:
while tmp[0] not in vowel :tmp.rotate(-1)
for i in tmp:
print(i,end='')
print("ay")
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 10804 카드 역배치 (0) | 2021.12.03 |
---|---|
백준 9243 파일 완전 삭제 (0) | 2021.12.03 |
백준 8741 이진수 합 (0) | 2021.12.03 |
백준 7600 문자가 몇갤까 (0) | 2021.12.03 |
백준 10173 니모를 찾아서 (0) | 2021.12.02 |
댓글