โš”๏ธ Dragons Fury โ€” Write-Up | Cyber Apocalypse 2025

Details
URL [Hack The Box :: Dragons Fury
Difficulty Easy
Team Rank 541 / 8129
CTF Date 26 Mar, 13:00

๐Ÿ“œ Challenge Description

The dragons strike Malakarโ€™s forces in rounds. Each round presents multiple damage options. The goal is to choose exactly one attack per round so the total damage equals a target number T.

Only one valid combination exists.

๐ŸŽฏ Objective

Find the unique combination of one value from each round that sums to T.

๐Ÿ’ป Code Solution

import ast

# Read inputs
rounds = ast.literal_eval(input().strip())
target = int(input().strip())

def find_combination(index, path, current_sum):
    if index == len(rounds):
        if current_sum == target:
            return path
        return None
    
    for damage in rounds[index]:
        result = find_combination(index + 1, path + [damage], current_sum + damage)
        if result:
            return result

# Execute search
solution = find_combination(0, [], 0)

# Output result
print(solution)

๐Ÿงช Provided Example

Input:

[[13, 15, 27, 17], [24, 15, 28, 6, 15, 16], [7, 25, 10, 14, 11], [23, 30, 14, 10]]
77

โœ… Output

[13, 24, 10, 30]

๐Ÿ”ฎ Final Challenge Input

Input

[[9, 17, 16, 10], [30, 5, 18, 11], [27, 20]] 61

โœ… Output

[16, 18, 27]

๐Ÿ Flag

‘‘HTB{DR4G0NS_FURY_SIM_C0MB0_5d9d3203c7bbd1ab41151a7d0639af4d}’’