mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
17 lines
246 B
Go
17 lines
246 B
Go
package main
|
|
|
|
import "unicode"
|
|
|
|
func ContainsAtLeastNSpecial(s string, n int) bool {
|
|
count := 0
|
|
for _, r := range s {
|
|
if !(unicode.IsLetter(r) || unicode.IsDigit(r)) {
|
|
count++
|
|
if count >= n {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
return false
|
|
}
|