← All problemsSign in

Another Deli-ceilous problem!

CodeChefRating 2495Open on judge ↗

Chef Avi is stuck on a not-so-trivial problem. His teacher gave him an array $A$ of size $N$ and $Q$ queries,each query containing 3 integers $X,L,R$. For each query help him find the value of $\sum_{i=L}^{R}ceil(X/A_i)$, where $ceil(x)$ is the smallest integer greater than or equal to $x$. Note that it is a 1-indexed array. ###Input: - First line will contain two integers $N$ and $Q$.

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