Ticket to Paradise
CodeChefOpen on judge ↗
Lina won a ticket for visiting “Paradise” in a lottery. But Paradise people had a rule that one can get into Paradise with only skill and not by chance. So they asked a question which was as follows “You are given n positive integers, $A = a_i, a_2, a_3, … a_n$. . And your task is to find the total number of subsets in A whose product is divisible by $5$.” But Lina was very anxious and turned
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