Sponsored
Use these hints if you're stuck. Try solving on your own first.
Iterate backward from the last index.
Each number can be divided by its largest proper divisor to yield its smallest prime divisor.
Solve with full IDE support and test cases