Your input is a rectangular 2D char array, such as so:
.X.......X
..........
.....X....
..X.......
........X.
.X........
..X.....X.
X.........
....X.....
Your goal is to find the biggest rectangle within this input data which contains only one "X". In this case it's 40.
Other testcases:
1
X
0, ...
In this challenge you will write a program or function which takes a string and calculates its score.
The score is the number of distinct characters, plus each integer \$n\$ such that there is a character appearing exactly \$n\$ times.
For example the string abcaaccac should score 8, since there ...