olymmath

BALTIC-WAY 2003 Problem 17

    All the positive divisors of a positive integer nn are stored into an array in increasing order. Mary has to write a program which decides for an arbitrarily chosen divisor d>1d>1 whether it is a prime. Let nn have kk divisors not greater than dd. Mary claims that it suffices to check divisibility of dd by the first ⌈k/2⌉\lceil k / 2\rceil divisors of nn : If a divisor of dd greater than 1 is found among them, then dd is composite, otherwise d is prime. Is Mary right?

    Dataset text NuminaMath olympiads. Quoted with source.

    Solutions

    No solution is on olymmath yet. Official and human solutions come first when they arrive. AI solutions come after them, with a label.

    Add a solution

    Locator baltic-way/2003/p17 · Tag 1NGK64NHAN · Edit this page on GitHub · Keys: j next, k previous