Maths Olympiad Prep

Track / Stage 4 / 100 of 340 #840 of 2444

Problem 840

AMC 12 late, AIME early
Number theory Difficulty 4.6 Find the answer HMMT November

Find the number of positive integers less than 1000000 which are less than or equal to the sum of their proper divisors. If your answer is XX and the actual value is YY, your score will be max(0,20801XY)\max \left(0,20-80\left|1-\frac{X}{Y}\right|\right) rounded to the nearest integer.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Next problem →

Official solution

N=1000000\mathrm{N}=1000000 s=[0] N\mathrm{s}=[0] * \mathrm{~N} ans =0=0 for i in range(1, N): if i <= s*: ans +=1+=1 for jj in range(i + i, N, i): s[j]+=s[j]+= i print(ans)

Source: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.