Saturday, September 6, 2014
EmoticonsDiv2
Problem
Idea : Given emoticon number N and one emoticon . You have to make N emoticon by copy pasting the given emoticon . You have to determine the smallest number of action to reach N .
To do so , we think a function that gives minimum number of action for N . Now see , we can copy paste only those imoticon whoose number are proper divisor of N . If N = 1 , then we need 0 action to reach N . Because we have 1 emoticon given . It can be base case . For every divisor of N . We calculate the action number and take the minimum one .
My Solution
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment