#K86297. Prime Squares
Prime Squares
Prime Squares
Given a non-negative integer \(n\), compute a list where the \(i\)-th element (0-indexed) is the square of the \(i\)-th prime number, for the first \(n\) prime numbers.
For instance, if \(n = 5\), the first 5 prime numbers are \(2, 3, 5, 7, 11\) and their squares are \(4, 9, 25, 49, 121\). The output should be formatted exactly in the Python list style.
Examples:
- Input: 0 → Output: []
- Input: 1 → Output: [4]
- Input: 2 → Output: [4, 9]
- Input: 3 → Output: [4, 9, 25]
- Input: 5 → Output: [4, 9, 25, 49, 121]
inputFormat
The input consists of a single line containing a non-negative integer \(n\) (\(n \ge 0\)), which specifies the number of prime numbers to consider.
outputFormat
Output a list in the Python list format (including the square brackets and commas) representing the squares of the first \(n\) prime numbers.
## sample0
[]