Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function miningRig(input) {
- let videosPrice = Number(input[0]) * 13;
- let cablesPrice = Number(input[1]) * 13;
- let powerPerDay = Number(input[2]) * 13;
- let profitPerDay = Number(input[3]) * 13;
- let computerPrice = videosPrice + cablesPrice + 1000;
- console.log(computerPrice);
- console.log(Math.ceil(computerPrice / (profitPerDay - powerPerDay)));
- }
- Тарикатско решение:)
- function miningRig(input) {
- let computerPrice = (Number(input[0]) + Number(input[1])) * 13 + 1000;
- console.log(`${computerPrice}\n${Math.ceil(computerPrice / (Number(input[3]) * 13 - Number(input[2]) * 13))}`);
- }
Add Comment
Please, Sign In to add comment