From a55394ce5d224be7d80f1cafaccb6c27d0a717d7 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 12 Nov 2020 17:26:57 +0100 Subject: [PATCH] 2020 fall base code --- challenges/2020-fall.py | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 challenges/2020-fall.py diff --git a/challenges/2020-fall.py b/challenges/2020-fall.py new file mode 100644 index 0000000..38852c3 --- /dev/null +++ b/challenges/2020-fall.py @@ -0,0 +1,44 @@ +import sys +import math + +# Auto-generated code below aims at helping you parse +# the standard input according to the problem statement. + + +# game loop +while True: + action_count = int(input()) # the number of spells and recipes in play + for i in range(action_count): + # action_id: the unique ID of this spell or recipe + # action_type: in the first league: BREW; later: CAST, OPPONENT_CAST, LEARN, BREW + # delta_0: tier-0 ingredient change + # delta_1: tier-1 ingredient change + # delta_2: tier-2 ingredient change + # delta_3: tier-3 ingredient change + # price: the price in rupees if this is a potion + # tome_index: in the first two leagues: always 0; later: the index in the tome if this is a tome spell, equal to the read-ahead tax + # tax_count: in the first two leagues: always 0; later: the amount of taxed tier-0 ingredients you gain from learning this spell + # castable: in the first league: always 0; later: 1 if this is a castable player spell + # repeatable: for the first two leagues: always 0; later: 1 if this is a repeatable player spell + action_id, action_type, delta_0, delta_1, delta_2, delta_3, price, tome_index, tax_count, castable, repeatable = input().split() + action_id = int(action_id) + delta_0 = int(delta_0) + delta_1 = int(delta_1) + delta_2 = int(delta_2) + delta_3 = int(delta_3) + price = int(price) + tome_index = int(tome_index) + tax_count = int(tax_count) + castable = castable != "0" + repeatable = repeatable != "0" + for i in range(2): + # inv_0: tier-0 ingredients in inventory + # score: amount of rupees + inv_0, inv_1, inv_2, inv_3, score = [int(j) for j in input().split()] + + # Write an action using print + # To debug: print("Debug messages...", file=sys.stderr, flush=True) + + + # in the first league: BREW | WAIT; later: BREW | CAST [] | LEARN | REST | WAIT + print("BREW 0")