From 48dbf47a6a4e6821bfba886ce04a57ebe0a0cbd0 Mon Sep 17 00:00:00 2001 From: Lukas Baumann Date: Thu, 18 Feb 2021 19:19:09 +0100 Subject: [PATCH] Create 1 - Timbits --- 06D/1 - Timbits | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 06D/1 - Timbits diff --git a/06D/1 - Timbits b/06D/1 - Timbits new file mode 100644 index 0000000..6c931a9 --- /dev/null +++ b/06D/1 - Timbits @@ -0,0 +1,16 @@ +timbitsLeft = int(input()) +totalCost = 0 + +bigBoxes = int(timbitsLeft / 40) +totalCost = bigBoxes * 6.19 +timbitsLeft -= 40 * bigBoxes + +if timbitsLeft >= 20: + totalCost += 3.39 + timbitsLeft -= 20 +if timbitsLeft >= 10: + totalCost += 1.99 + timbitsLeft -= 10 + +totalCost += timbitsLeft * 0.20 # step 6 +print(totalCost)