We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Grading Students
Grading Students
Sort by
recency
|
4044 Discussions
|
Please Login in order to post a comment
Java solution:
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.function.; import java.util.regex.; import java.util.stream.*; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList;
class Result {
} }
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
}
For Python 3:
In java, Using this code in for-loop array:
func gradingStudents(grades: [Int]) -> [Int] { // Write your code here grades.map{ grade in if grade > 37 { let diff = 5 - (grade%5); return diff < 3 ? grade + diff : grade; } else { return grade; } } }
Python 3 Kindly ignore the return indentation. I don't know why, it is not getting deleted