Chef and Colorful stars
CodeChefOpen on judge ↗
The cosmo carnival is going on in IIIT Bhubaneswar. The carnival has lot of stars and planets having a unique number. Chef has to find that the planet/star is colorful or not. The planet/star is said to to be colorful if product of every digit of a contiguous subsequence is different. A number can be broken into different contiguous sub-subsequence parts. Help chef find out if the star is colorful
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