Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function trainingLab(input) {
- let lenght = Number(input[0]);
- let width = Number(input[1]);
- let reservedSeats = 3;
- let reservedSpace = 100;
- // Едно работно място заема 70 на 120 cm
- // Коридорът е широк поне 100 cm.
- let convertedLenght = lenght * 100;
- let convertedWidth = width * 100;
- let widthAfterReservedSpace = convertedWidth - reservedSpace;
- let workingPlacesWidth = Math.floor(widthAfterReservedSpace / 70);
- let workingPlacesLenght = Math.floor(convertedLenght / 120);
- let allWorkingPlaces = (workingPlacesLenght * workingPlacesWidth) - reservedSeats;
- console.log(allWorkingPlaces);
- }
Add Comment
Please, Sign In to add comment