Hackerrank – Grading Students

Hackerrank – Problem Statement

A description of the problem can be found on Hackerrank.

Solution

We will use professor’s rules and transform all grades:
– We find how many times (n) is 5 in given grade
– if it is divisible without a remainder, we do nothing
– it not we round it to neareast greater number disible by 5(n + 1) * 5
– do nothing with grades less than 38
– return the result

I created solution in:

All solutions are also available on my GitHub profile.

Scala

Java

Javascript

Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *