You are viewing a single comment's thread. Return to all comments →
Yes i have understood. But how can we proceed with program when our lcm is coming to be negative. Shouldnt the program logic give wrong results then?
I've noticed hackerRank has poor tests. That is why such solutions pass tests.
Specifically in this task variable l can not be greater than 100. So I recommend you return 101, when result variable from lcm fuction is coming greater than 100. It will prevent for loop which count "count" variable
So sorry for my poor english, it is not my native language
you are welcome
yeah i too feel that hkrnk has poor tstcases