Deltix Rounds 2021
→ Problem tags
No tags yet
No tag edit access
The problem statement has recently been changed.
View the changes.
231. Prime Sum
time limit per test: 0.25 sec.
memory limit per test: 4096 KB
Find all pairs of prime numbers (A, B) such that A<=B and their sum is also a prime number and does not exceed N.
The input of the problem consists of the only integer N (1<=N<=10^6).
On the first line of the output file write the number of pairs meeting the requirements. Then output all pairs one per line (two primes separated by a space).
Leningrad Regional School Programming Olympiad
January 9, 2004
(c) Copyright 2010-2021 Mike Mirzayanov
The only programming contests Web 2.0 platform
Desktop version, switch to