Skip to content

Latest commit

 

History

History

240-mersenne-prime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Mersenne prime

Challenge Description:

In January 2013, GIMPS contributors discovered the 48th known Mersenne prime number. For this, they received a $100,000 award. A newly announced $150,000 reward will be given to those who will discover the next largest known prime.
Do not want to get it? We offer this challenge to you to get ready.

Input sample:

The first argument is a path to a file. Each line includes a test case with an integer.

4
308

Output sample:

Your task is to print all Mersenne numbers that are smaller than the number in a test case. Separate those numbers by commas.

3
3, 7, 31, 127

Constraints:

  1. The number in a test case can be from 4 to 3,000.
  2. The number of test cases is 20.