CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 20:00:56 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=40d4f86d635be11d20f9aa28506b921e22a1a3a44a9d2498f1ad42c396545cdca%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22botvh5UWqgEhDEGS-5zfrreNG_CNYmo5%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d0f24d4b5eb080-BLR
//06. Tournament of Christmasfunction tournamentOfChristmas(arg) { let co - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //06. Tournament of Christmas
- function tournamentOfChristmas(arg) {
- let countDays = parseInt(arg.shift())
- let countTotalMoney = 0
- let countTotalWin = 0
- let countTotalLoose = 0
- for (let i = 1; i <= countDays; i++) {
- let command = arg.shift()
- let winGames = 0
- let loseGames = 0
- let countDaysMoney = 0
- while (command != 'Finish') {
- let winOrLose = arg.shift()
- if (winOrLose == 'win') {
- winGames++
- countDaysMoney += 20
- }
- else if (winOrLose == 'lose')
- loseGames++
- command = arg.shift()
- }
- if (winGames > loseGames)
- countDaysMoney *= 1.1
- countTotalMoney += countDaysMoney
- countTotalWin += winGames
- countTotalLoose += loseGames
- }
- if (countTotalWin > countTotalLoose) {
- countTotalMoney *= 1.2
- console.log(`You won the tournament! Total raised money: ${countTotalMoney.toFixed(2)}`)
- }
- else
- console.log(`You lost the tournament! Total raised money: ${countTotalMoney.toFixed(2)}`)
- }
- tournamentOfChristmas(
- [
- '2', 'volleyball',
- 'win', 'football',
- 'lose', 'basketball',
- 'win', 'Finish',
- 'golf', 'win',
- 'tennis', 'win',
- 'badminton', 'win',
- 'Finish'
- ]
- )
Advertisement
Add Comment
Please, Sign In to add comment
-
β
β Make huge profits on trading ββ O
JavaScript | 1 sec ago | 0.25 KB
-
π Swapzone +37% glitch β O
JavaScript | 3 sec ago | 0.25 KB
-
π Exchange profit method
JavaScript | 8 sec ago | 0.24 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 10 sec ago | 0.25 KB
-
β
β Make huge profits on trading ββ 5
JavaScript | 12 sec ago | 0.25 KB
-
β Free Crypto Method β
JavaScript | 17 sec ago | 0.24 KB
-
ββ
Exploit 2500$ in 15 Minutesβββ P
JavaScript | 19 sec ago | 0.25 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 21 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