Valleri

Telerik Kids October 2013 - 5th Grade - Bankomat

Jul 17th, 2014
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Solve(args) {
  2.     var input = args[0].split(' ');
  3.  
  4.     var student = parseInt(input[0]);
  5.     var perBox = parseInt(input[1]);
  6.     var cost = parseFloat(input[2]);
  7.  
  8.     var ofBoxes = ((student + 1) / perBox).toFixed(0);
  9.  
  10.     console.log(Math.ceil((ofBoxes * cost) / 10) * 10);
  11. }
Add Comment
Please, Sign In to add comment