We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Your solution is perfectly fine but as a first draft. Whenever possible take out common operations and put it in a variable so next time what if the moderator said that multiple of 6 instead of 5 . you'll have to change at 2 places in your case but it may be a become bigger issue in complex chunk. Just saying. :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
Your solution is perfectly fine but as a first draft. Whenever possible take out common operations and put it in a variable so next time what if the moderator said that multiple of 6 instead of 5 . you'll have to change at 2 places in your case but it may be a become bigger issue in complex chunk. Just saying. :)