We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #7: 10001st prime

Project Euler #7: 10001st prime

Problem
Submissions
Leaderboard
Discussions

This problem is a programming version of Problem 7 from projecteuler.net

By listing the first six prime numbers: and , we can see that the prime is .
What is the prime number?

Input Format

First line contains that denotes the number of test cases. This is followed by lines, each containing an integer, .

Constraints

Output Format

Print the required answer for each test case.

Sample Input 0

2
3
6

Sample Output 0

5
13

Explanation 0

The first prime numbers are


we can see that prime number is and prime number is

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

24884

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Choose a translation


  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy