CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 19:48:46 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=68ae5fac5a18727cdba0c8940138a96b3d479e8e4fd400f234d4f72cc77496fda%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22RLzhvZWPCVEcI-8gdgaGXGd1EYwH9mFE%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d0e07b2f0d3585-BLR
Pipes In Pool - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //02. Pipes In Pool.js
- function pipesInPool(arr) {
- 'use strict'
- let input = arr[0].split('\n')
- let volumeLitres = Number(input[0])
- let p1LitresPerHour = Number(input[1])
- let p2LitresPerHour = Number(input[2])
- let hNoWorker = Number(input[3])
- let waterLitres = (p1LitresPerHour * hNoWorker) + (p2LitresPerHour * hNoWorker)
- if (waterLitres <= volumeLitres) {
- let percent = Math.trunc(waterLitres / volumeLitres * 100)
- let percent1 = Math.trunc(p1LitresPerHour * hNoWorker / waterLitres * 100)
- let percent2 = Math.trunc(p2LitresPerHour * hNoWorker / waterLitres * 100)
- console.log(`The pool is ${percent}% full. Pipe 1: ${percent1}%. Pipe 2: ${percent2}%.`)
- } else {
- console.log(`For ${hNoWorker} hours the pool overflows with ${waterLitres - volumeLitres} liters.`)
- }
- }
- pipesInPool(['1000\n100\n120\n3'])
- pipesInPool(['100\n100\n100\n2.5'])
- function pipesInPool0(arr) {
- let input = arr[0].split('\n')
- let volume = parseInt(input[0])
- let pipe1 = parseInt(input[1])
- let pipe2 = parseInt(input[2])
- let hours = +input[3]
- let water = (pipe1 + pipe2) * hours;
- if (water <= volume) {
- console.log(
- `The pool is ${~~((water / volume) * 100.0)}% full. Pipe 1: ${~~((pipe1 * hours) / water * 100.0)}%. Pipe 2: ${~~(((pipe2 * hours) / water) * 100.0)}%.`);
- }
- else {
- console.log(
- `For ${hours} hours the pool overflows with ${water - volume} liters.`);
- }
- }
- function pipesInPool2(arr) {
- let input = arr[0].split('\n')
- let volume = Number(input[0])
- let p1 = Number(input[1])
- let p2 = Number(input[2])
- let hours = Number(input[3])
- let pipe1 = p1 * hours;
- let pipe2 = p2 * hours;
- let pipePool = pipe1 + pipe2;
- if (pipePool <= volume) {
- let poolPercent = (pipePool / volume) * 100;
- let p1Percent = (pipe1 / pipePool) * 100;
- let p2Percent = (pipe2 / pipePool) * 100;
- console.log(`The pool is ${Math.trunc(poolPercent)}% full. Pipe 1: ${Math.trunc(p1Percent)}%. Pipe 2: ${Math.trunc(p2Percent)}%.`);
- } else if (pipePool > volume) {
- let overFlow = pipePool - volume;
- console.log(`For ${hours} hours the pool overflows with ${overFlow} liters.`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
β Free Crypto Method β
JavaScript | 4 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)ββ 1
JavaScript | 4 sec ago | 0.25 KB
-
π Crypto Swap Glitch β
Working
JavaScript | 13 sec ago | 0.24 KB
-
ββ
Swapzone Glitch β
Working ββ E
JavaScript | 15 sec ago | 0.25 KB
-
π EASY MONEY GUIDE β
Working
JavaScript | 22 sec ago | 0.24 KB
-
β
Make $2500 in 20 minutesβββ X
JavaScript | 24 sec ago | 0.25 KB
-
π ChangeNOW Exploit
JavaScript | 32 sec ago | 0.24 KB
-
π Swapzone +37% glitch β O
JavaScript | 32 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand