The primary system of expressing numbers has three digits: m, x, and p, which correspond to -1, 0, and 1. The places in a primary number correspond to the prime numbers. For example, the number 6 could be ppm in primary notation because 6 = 5*1 + 3*1 + 2*(-1). Similarly, the number 20 could be ppxxp in primary notation.
Because integers can be expressed as sums (and differences) of primes in several ways, several primary notations for a number can exist. Cody Problem 60783 deals with proper primary notation.
Write a function to convert integers expressed in primary notation to base 10.

Solution Stats

10 Solutions

8 Solvers

Last Solution submitted on Aug 09, 2025

Last 200 Solutions

Solution Comments

Show comments
Loading...