You are given a positive integer n. Your task is to return the nth prime number, counting prime numbers in ascending order starting from 2.
A prime number is an integer greater than 1 that has exactly two distinct positive divisors: 1 and itself.
Input: n = 1
Output: 2
Explanation: The first prime number is 2.
Input: n = 5
Output: 11
Explanation: The first five prime numbers are 2, 3, 5, 7, and 11. Therefore, the fifth prime is 11.
Input: n = 10
Output: 29
Explanation: The tenth prime number in ascending order is 29.
Sign in to write, run, and submit your solution against the full test suite.