solved maxcount in C,Python,Java