Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 01. Sum Seconds
- first = int(input())
- second = int(input())
- third = int(input())
- total_time = first + second + third
- minutes = total_time // 60
- seconds = total_time % 60
- if seconds < 10:
- print(f'{minutes}:0{seconds}')
- else:
- print(f'{minutes}:{seconds}')
- ===========================================================
- 02. Bonus Score
- number = int(input())
- bonus_points = 0
- if number <= 100:
- bonus_points += 5
- elif number > 1000:
- bonus_points += number * 0.1
- else:
- bonus_points += number * 0.2
- if number % 2 == 0:
- bonus_points += 1
- elif number % 10 == 5:
- bonus_points += 2
- print(bonus_points)
- print(bonus_points + number)
- ===========================================================
- 03. Time + 15 Minutes
- hours = int(input())
- minutes = int(input())
- minutes += 15
- if minutes > 59:
- hours += 1
- minutes -= 60
- if hours > 23:
- hours = 0
- if minutes < 10:
- print(f'{hours}:0{minutes}')
- else:
- print(f'{hours}:{minutes}')
- ======================================================================================================================
- 04. Toy Shop
- trip_price = float(input())
- puzzles_number = int(input())
- dolls_number = int(input())
- bears_number = int(input())
- minions_number = int(input())
- trucks_number = int(input())
- price = puzzles_number * 2.6 + dolls_number * 3.0 + bears_number * 4.1 + minions_number * 8.2 + trucks_number * 2.0
- total_number = puzzles_number + dolls_number + bears_number + minions_number + trucks_number
- if total_number >= 50:
- price_one = price - price * 0.25
- else:
- price_one = price
- total_price = price_one - price_one * 0.1
- if trip_price <= total_price:
- print(f'Yes! {(total_price - trip_price):.2f} lv left.')
- else:
- print(f'Not enough money! {(trip_price - total_price):.2f} lv needed.')
- ===========================================================
- 05. Godzilla vs. Kong
- budget = float(input())
- count_statists = int(input())
- price_clothing_statist = float(input())
- decor = 0.1 * budget
- clothes = count_statists * price_clothing_statist
- if count_statists > 150:
- clothes = clothes - 0.10 *clothes
- expenses = decor + clothes
- if budget >= expenses:
- print("Action!")
- money_left = budget - expenses
- print(f"Wingard starts filming with {money_left:.2f} leva left.")
- else:
- print("Not enough money!")
- money_needed = expenses - budget
- print(f"Wingard needs {money_needed:.2f} leva more.")
- ===========================================================
- 06. World Swimming Record
- record_in_seconds = float(input())
- distance = float(input())
- time = float(input())
- total_time = distance * time
- delay = distance // 15 * 12.5
- total_time += delay
- if total_time < record_in_seconds:
- print(f'Yes, he succeeded! The new world record is {total_time:.2f} seconds.')
- else:
- print(f'No, he failed! He was {total_time - record_in_seconds:.2f} seconds slower.')
- ===========================================================
- 07. Shopping
- budget = float(input())
- videocards = int(input())
- processors = int(input())
- ram_memories = int(input())
- videocards_costs = videocards * 250
- processors_costs = processors * videocards_costs * 0.35
- ram_memories_costs = ram_memories * videocards_costs * 0.10
- all_costs = videocards_costs + processors_costs + ram_memories_costs
- if videocards > processors:
- all_costs -= all_costs * 0.15
- money_left = abs(budget - all_costs)
- if all_costs <= budget:
- print(f'You have {money_left:.2f} leva left!')
- else:
- print(f'Not enough money! You need {money_left:.2f} leva more!')
- ===========================================================
- 08. Lunch Break
- import math
- series = input()
- episode_duration = int(input())
- break_duration = int(input())
- lunch_time = break_duration / 8
- relax_time = break_duration / 4
- needed_time = lunch_time + relax_time + episode_duration
- rest_time = abs(break_duration - needed_time)
- if needed_time <= break_duration:
- print(f'You have enough time to watch {series} and left with {math.ceil(rest_time)} minutes free time.')
- else:
- print(f"You don't have enough time to watch {series}, you need {math.ceil(rest_time)} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement