MCPcopy Create free account
hub / github.com/MathProgrammer/CodeForces / find_minimum_tax

Function find_minimum_tax

C Programs/C Programs - 3/Taxes.c:48–71  ·  view source on GitHub ↗

If the number is prime, then only 1 has to be paid. That is the minimum possible. The next minimum is 2. Since the Goldbach conjecture has been verified upto the limit, we can use it. Any even number is the sum of two primes. We don't need to actually find the pair of primes, we just know it exists. If a number is odd and composite , n = (n-2) + 2, is the only way it can be written as the sum

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainFunction · 0.85

Calls 1

is_primeFunction · 0.70

Tested by

no test coverage detected