Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12-seongwon030 #50

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from itertools import combinations

L,C = map(int,input().split())

k = list(map(str,input().split()))
vowels = 'aeiou'

vowel_cnt = 0
consonant_cnt = 0

result = []
for c in combinations(k,L):
vowel_str = ''.join(sorted(c))
vowel_cnt = sum(1 for char in vowel_str if char in vowels)
consonant_cnt = L - vowel_cnt
if vowel_cnt >=1 and consonant_cnt >=2:
Copy link
Collaborator

@yuyu0830 yuyu0830 May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ฐ„๋‹จํ•œ ํŒ์ธ๋ฐ x == 1 ์ด๋‚˜ x >= 1 ๊ฐ™์€ ์ฝ”๋“œ๋Š” ๊ทธ๋ƒฅ x๋กœ ์“ฐ๋ฉด ๊ฐ™์€ ํšจ๊ณผ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

result.append(vowel_str)

result.sort()
for word in result:
print(word)