← All problemsSign in

Amazing Substrings

## Problem Statement The following is an integer array `X` = `x1,x2,…,xm`. `Y` will be a subsequence of `X` if if it is possible to remove some elements from `X` to get `Y`. The integer array `Y` `y1,y2,…,yk` is called Amazing if it is not empty and for every `j (1≤j≤k)` `yi` is perfectly divisible by `j`. Find the number of Amazing subsequences in `X` modulo `(10^9)+7`. Two subs

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start