Company: CDK Global
Difficulty: medium
Animesh forms String Animesh loves to form new and unique sequences and arrangements so one day he decides to create a new type of string. Help him in creating his new special string. You are given a string s of length |s| and an integer n . Now, you are required to find a string of length at most n such that if you add this string x number of times (str+str+....x times) let us say it is xstr, then the frequency of each character in xstr string should be greater than or equal to the frequency of the same character in the string s. xstr should cover all the characters of string s. Help Animesh in finding the minimum value of x. Input Format The first line contains an integer n representing the maximum length of string that Animesh can write. The second line contains a string s representing the given string. Output Format Print an integer denoting the minimum possible value of x. Constraints 2 ≤ n ≤ 10 5 1 ≤ |s| ≤ 10 5 s only contains lowercase letters, that is, a-z The total number of d