Dragon Fury Writeup
Cyber Apocalypse 2025
Solved by thewhiteh4t
- Simulate the battle by computing the total damage dealt over successive rounds until victory is achieved
import json
import random
input_text = json.loads(input())
T = int(input())
num_sublists = len(input_text)
def magic():
rand_t = 0
choices = []
for sublist in input_text:
rand = random.choice(sublist)
choices.append(rand)
rand_t += rand
return rand_t, choices
random_sum = 0
flag_choices = None
while random_sum != T:
random_sum, flag_choices = magic()
print(flag_choices)