basic
1 minute to read
We are asked to represent 51 in base 12. This is simple:
$ python3 -q
>>> def dec_to_base(n: int, b: int) -> int:
... digits = []
... while n:
... digits.append(n % b)
... n //= b
... return int(''.join(map(str, digits[::-1])))
...
>>> dec_to_base(51, 12)
43
>>> 4 * 12 + 3
51
So the flag is ictf{43}
.