Dragons Fury | Coding
-
1 min read

โ๏ธ 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}’’
