Limits: 1s, 512 MB
Jenith is a student of CSE of Metropolitan University (MU). Recently her fifth term’s result has been published. She obtained CGPA 4 out of 4. Her classmates ask her to calculate their CGPA. Actually she helps her friends to calculate their CGPA from the first term. Sometimes she feels bore, so she wants to write a program now that will help her friends to calculate their CGPA. As you are a very good programmer she needs your help.
This is a companion discussion topic for the original entry at https://toph.co/p/cgpa-the-golden-egg