Chef And Numbers
CodeChefOpen on judge ↗
Chef has been given two integers $n$ and $m$. He creates two lists of integers — the first one having integers from $1$ to $n$ and the second list having integers from $1$ to $m$. Now, Chef wants to count the number of integral pairs can be chosen, one number of the pair from the first list and the other number from the the second list, such that $5$ divides the sum of the chosen numbers. Chef
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