Fear Factoring
Time limit1sMemory limit512 MB
Given a and b up to 1e12 with b-a at most 1e6, sum the divisor sums F(n) over every n in [a, b].
- Level
Medium7 of 10
- Topics
- Number theory, Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
The Slivians are afraid of factoring. It is, well, difficult.
They do not even care about the factors themselves, only about how much they sum to.
Define as the sum of all factors of , so and . Given two integers and with , compute
Input
The first line contains two integers and separated by a space. (, )
Output
Print on a single line.