Description
The rules are simple. If the number is divisible by two, shift it right by one. Otherwise, if it is a multiple of five, divide by five. If it is neither but it is a multiple of three, then add eight. Repeat this process until it yields the flag.
Attachments
328125, 309375, 3712, 3264, 384375, 221875, 1536, 1536, 3200, 296875, 2752, 303125, 3648, 153125, 303125, 3136, 3456, 159375, 296875, 2496, 303125, 340625, 159375, 359375, 296875, 2624, 296875, 2688, 3328, 159375, 328125, 3648, 296875, 1536, 371875, 3520, 296875, 2624, 159375, 371875, 303125, 3648, 3200, 390625
Writeup
Straightforward coding challenge with really simple rules. One sample solution:
numbers = [328125, 309375, 3712, 3264, 384375, 221875, 1536, 1536, 3200, 296875, 2752, 303125, 3648, 153125, 303125, 3136, 3456, 159375, 296875, 2496, 303125, 340625, 159375, 359375, 296875, 2624, 296875, 2688, 3328, 159375, 328125, 3648, 296875, 1536, 371875, 3520, 296875, 2624, 159375, 371875, 303125, 3648, 3200, 390625]
while "ictf" not in (flag := ''.join(chr(n) for n in numbers)):
for i in range(len(numbers)):
if numbers[i] % 2 == 0:
numbers[i] >>= 1
elif numbers[i] % 5 == 0:
numbers[i] //= 5
elif numbers[i] % 3 == 0:
numbers[i] += 8
print(flag)
Flag
ictf{G00d_Var1abl3_Nam3s_R_Th3ir_0wn_R3ward}