My Fair Coins
There are coins of $2$ different denominations in Crazyland, $1$-cent coins and $2$-cent coins. They have two faces - heads and tails. Your task is to find out the the number of ways to create a linear arrangement of these coins so that their sum is $N$ cents. The only condition on the linear arrangement is that the first coin in the arrangement should always have heads up. All other coins could
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