• + 0 comments

    C#

        {
            int max = int.MinValue;
            
            foreach (char c in word){
                int i = ((int)c % 32)-1;
                if (h[i] > max){
                    max = h[i];
                }
            }
            
            return (max * word.Length);
        }