16
QB64 Discussion / February Number Challenge
« on: February 11, 2022, 02:14:18 pm »
I found this at Liberty Basic Forum (Feb 8) and so far nobody there has figured it out.
I just did but let's see if someone else can here at this forum:
tsh73
I couldn't solve it with Google only learned that non trivial divisor is not the same as a proper divisor.
I tried brute force but that was going to take hours, no there is a little thing you have to discover then easy as pie.
It's fine if your list the three divisors and the number between 123456789 and 223456789 more than one but not many.
I just did but let's see if someone else can here at this forum:
tsh73
Quote
It is high-school test problem my kid got yesterday
I jumped in - but after getting something working... I Googled and it happened that I solved quite anoter task (Doh).
So here is it (Google-translated text, original is in Russian)
Let's call a nontrivial divisor of a natural number its divisor, which is not equal to one and the number itself. For example, the number 6 has two nontrivial divisors: 2 and 3. Find all natural numbers belonging to the segment [123456789; 223456789] and having exactly three nontrivial divisors. For each found number, write down its largest nontrivial divisor in the answer. Arrange the answers in ascending order.
Could you solve it without Google?
I couldn't solve it with Google only learned that non trivial divisor is not the same as a proper divisor.
I tried brute force but that was going to take hours, no there is a little thing you have to discover then easy as pie.
It's fine if your list the three divisors and the number between 123456789 and 223456789 more than one but not many.