From 6bc595b41dbd62d87251f7bfe22c13a4b69aaaf4 Mon Sep 17 00:00:00 2001 From: SinnoLn Date: Thu, 20 Aug 2026 00:26:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A7=84=ED=9D=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../3813. Vowel-Consonant Score.java" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "leetcode3/\354\235\264\354\247\204\355\235\254/3813. Vowel-Consonant Score.java" diff --git "a/leetcode3/\354\235\264\354\247\204\355\235\254/3813. Vowel-Consonant Score.java" "b/leetcode3/\354\235\264\354\247\204\355\235\254/3813. Vowel-Consonant Score.java" new file mode 100644 index 00000000..76e76cc1 --- /dev/null +++ "b/leetcode3/\354\235\264\354\247\204\355\235\254/3813. Vowel-Consonant Score.java" @@ -0,0 +1,25 @@ +/* + +1. 아이디어 : 문자열 자음 모음 개수 세서 나눠주기, 이때 자음이 0이면 계산이 안되므로 0 반환 + +2. 시간복잡도 : O(N) + +3. 자료구조/알고리즘 : 계산 + + */ + +class Solution { + public int vowelConsonantScore(String s) { + int v = 0; + int k = 0; + + for(int i=0; i='a' && c<='z') k++; + } + + if(k == 0) return 0; + return (int)Math.floor(v/k); + } +} \ No newline at end of file