Професионална програма
Loading...
nicky_sd avatar nicky_sd 0 Точки

01. The Hunting Games - mid exam 10.03, group 2 - stuck in 50/100

Здравейте,

Може ли малко помощ с тази задача от mid exam 10.03. Зациклих на 50/100 в джъдж.

Моя код:https://pastebin.com/cSHt1Pbg

Условие:

A group of friends have decided to participate in a game called "The Hunting Games". The first stage of the game is to gather some supplies. They have a list and your job is to help them follow it and make the needed calculations.

Write a program that calculates the needed provisions for a quest in the woods.

First you will receive the days of the adventure, the count of the players and the group’s energy. Afterwards, you will receive the following provisions per day for one person:

  • Water

  • Food

Every day they chop wood and lose a certain amount of energy. For each of the days, you are going to receive the energy loss from chopping wood. The program should end If the energy reaches 0 or less.

Every second day they drink water, which boosts their energy with 5% of their current energy and at the same time drops their water supplies by 30% of their current water.

Every third day they eat, which reduces their food supplies by the following amount:

{currentFood} / {countOfPeople} and at the same time raises their group’s energy by 10%.

If they have enough energy to finish the quest, print the following message:

"You are ready for the quest. You will be left with - {energyLevel} energy!"

If they run out of energy print the following message and the food and water they were left with before they ran out of energy:

"You will run out of energy. You will be left with {food} food and {water} water."


 

Examples

Input

Output

10

7

5035.5

11.3

7.2

942.3

500.57

520.68

540.87

505.99

630.3

784.20

321.21

456.8

330

You are ready for the quest. You will be left with - 658.72 energy!

 

Input

Output

12

6

4430

9.8

5.5

620.3

840.2

960.1

220

340

674

365

345.5

212

412.12

258

496

You will run out of energy. You will be left with 229.17 food and 118.59 water.


 

Тагове:
0
PHP Fundamentals
Laus1986 avatar Laus1986 10 Точки

I never check the involvment of Hunting game in the casino sector.There are lot of other options where people can invest and trade in the hunting game.I have try to check about the https://casinosapproved.info/10-dollar-deposit-online-casinos/ site options for the casino games for earning the real money in this.

0