$ cat writeup.md…
$ cat writeup.md…
hackthebox
Task: Find two prime numbers in a list and output their product. Solution: Implement primality check and multiply the two primes found.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
The task provided a web interface with a code editor. The goal was to write a script that reads a list of numbers from stdin, identifies the two prime numbers in the list, and outputs their product.
This is a classic coding challenge. We are given a list of numbers, among which we need to find exactly two prime numbers and multiply them. The main difficulty lies in correctly implementing the primality check and handling the input data.
#!/usr/bin/env python3 import sys def is_prime(n): if n < 2: return False for i in range(2, int(n**0.5) + 1): if n % i == 0: return False return True ...