There was an error while loading. Please reload this page.
2 parents db58cc2 + 875fe26 commit c7839e9Copy full SHA for c7839e9
1 file changed
leetcode3/최원준/3813. Vowel-Consonant Score.py
@@ -0,0 +1,9 @@
1
+class Solution:
2
+ def vowelConsonantScore(self, s: str) -> int:
3
+ vc = [0,0]
4
+ for c in s:
5
+ if c in ('a','e','i','o','u'):
6
+ vc[0]+=1
7
+ elif c.isalpha():
8
+ vc[1]+=1
9
+ return floor(vc[0]/vc[1]) if vc[1]>0 else 0
0 commit comments