Problem statement
For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n.
NB : a number like 5 which is its own complementary to 10 is accepted as a couple : (5,5), but no duplicata should be in the list.
Examples (check the test suite for more)
  • n = 1 => p = [3, 7; 5, 5];
  • n = 2 => p = [3, 97; 11, 89; 17, 83; 29, 71; 41, 59; 47, 53];
Forbidden functions / expressions
  • regexp
  • assignin
  • str2num
  • echo
See also

Solution Stats

44 Solutions

33 Solvers

Last Solution submitted on Feb 12, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...