Advertisement
Valleri

Telerik Kids @ October 2013 - 5th grade - Шега

Jul 17th, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Solve(args) {
  2.     var LITERS_PER_GAL = 3;
  3.     var MILILIT_PER_GAL = 785;
  4.    
  5.     var gallons = parseInt(args);
  6.     console.log((gallons * LITERS_PER_GAL + Math.floor(((MILILIT_PER_GAL * gallons) / 1000))) + " " +
  7.                         (MILILIT_PER_GAL * gallons) % 1000);
  8. }
  9.  
  10. Solve("5");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement