baekjoon 20260201
This commit is contained in:
parent
7bb31c1601
commit
1ba8b115a9
12
code_study/Baekjoon/swift/10987.swift
Normal file
12
code_study/Baekjoon/swift/10987.swift
Normal file
@ -0,0 +1,12 @@
|
||||
let letters = readLine()!
|
||||
let count = letters.reduce(into: [:]){ counts, letter in counts[letter, default: 0] += 1 }
|
||||
|
||||
let s = "aeiou"
|
||||
var ans = 0
|
||||
for c in s {
|
||||
if let n = count[c] {
|
||||
ans += n
|
||||
}
|
||||
}
|
||||
|
||||
print(ans)
|
||||
Loading…
x
Reference in New Issue
Block a user