oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

chainprimes Output Only

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

chainprimes.html

Problem Description

Bradley, which you really should know by now, loves primes! But there's one thing you have not yet figured out, he loves chain primes even more. What are chain primes in the first place, you may ask. Here is the definition of chain primes.

Take a prime pair (p1, p2). This prime pair is a called a chain pair if 2 * p1 - 1 = p2. Chain primes are basically chains of these chain pairs. Take for example a chain (p1, p2, p3). This chain is a chain prime if in this case, p1 * 2 - 1 = p2 and p2 * 2 - 1 = p3.

Chain primes like this are usually very rare. To get points for this problem, submit a file containing a list of chain primes not exceeding 2*10^9. The longer your list, the more points you get for this problem. In fact, the points are calculated as follows: min(100, (length of sequence)*12.5)

Output Format

Your output file should contain one line, with a list of space-seperated integers, which should be the prime chain.

Tags

Number Theory

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110011s32MBMinimum

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.