Ashwin and Candy
CodeChefOpen on judge ↗
Ashwin has a candy stick of length $n$ ($n$ is a positive integer). He wants to divide that candy between his 4 friends. His friends will only accept the candy if their lengths are positive integers. Sadly, his friends are sad and picky. They will accept the candies and become happy if and only if they can be rearranged to form a quadrilateral whose interior angles are all equal. But his friends w
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