UOSPC Count
InterviewTime limit1sMemory limit1024 MB
Rearrange the letters of S to form as many copies of uospc as possible, and print that maximum count.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
A fox that lives on Baebong Mountain likes playing with strings. Among all shapes, the fox likes uospc the most! The fox wants to rearrange the characters of its string so that it can form as many uospc shapes as possible. For example, rearranging 'suspicion' gives uospcsiin, and rearranging 'processyourpurchase' gives uospcuospcreyrrhase.
Given a string of lowercase English letters, find the maximum number of uospc that a clever fox can obtain by rearranging the characters of .
Input
The first line contains an integer , the length of the string ().
The second line contains the string of length , consisting only of lowercase English letters.
Output
Print the maximum number of uospc that can be formed by rearranging the characters of .