Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
collection_items = input().split("|") budget = float(input()) ticket_price = 150 initial_budget = budget total_earned_money = 0 earned_money = [] for item in collection_items: item_arg = item.split("->") item_name = item_arg[0] item_price = float(item_arg[1]) if item_name == "Clothes" and item_price > 50: continue if item_name == "Shoes" and item_price > 35: continue if item_name == "Accessories" and item_price > 20.50: continue budget -= item_price sell_price = (item_price * 1.4) earned_money.append(f"{sell_price:.2f}") total_earned_money += sell_price if budget < item_price: break final_money = " ".join(earned_money) profit = total_earned_money + budget - initial_budget print(final_money) print(f"Profit: {profit:.2f}") if total_earned_money + budget >= ticket_price: print("Hello, France!") else: print("Not enough money.")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)