Covid Run
CodeChefOpen on judge ↗
**Covid-$19$** is spreading fast! There are $N$ cities, numbered from $0$ to $(N-1)$, arranged in a circular manner. City $0$ is connected to city $1$, $1$ to $2$, $\dots$, city $(N-2)$ to city $(N-1)$, and city $(N-1)$ to city $0$. The virus is currently at city $X$. Each day, it jumps from its current city, to the city $K$ to its right, i.e., from city $X$ to the city $(X+K)\%N$. As the virus
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.
Sign in to chat with the tutor and save your progress.
Sign in to start