### oasis's blog

By oasis, 7 years ago,

The problem number is 148A-"Insomnia Cure", i can not understand the problem...

• -8

 » 7 years ago, # |   +5 In simpler words you will be given k, l, m, n and d as inputs. now you need to count the numbers starting from 1 and ending at d, which are divisible by atleast one of k,l,m,n; Explanation of sample input 1 : here d=12, so you need to count numbers from 1,2,3,.....,12 which are divisible by atleast one of (1,2,3,4). You can observe that count = 12.
•  » » 7 years ago, # ^ |   -8 Thank you,achaitanyasai! It was very helpful.
•  » » » 7 years ago, # ^ |   +5 My pleasure :)
•  » » 11 months ago, # ^ |   -6 Perfect Answer
•  » » 6 weeks ago, # ^ |   0 thanks!
 » 23 months ago, # |   0 But why do we have to count like that , can you clearly explain how did you figure out why such an approach is required to be followed
•  » » 22 months ago, # ^ |   0 check my commnet
 » 22 months ago, # |   0 why i divide by k,l,m,n??I could not understand.
•  » » 22 months ago, # ^ |   0 check my comment
 » 22 months ago, # |   0 Every k-th dragon got punched in the face with a frying pan..it means from 1-d if a number is divisible by k then it suffered moral or physical damage.....same thing in l , m , n th....if a number from 1-d is divisible by any of 4 number then that dragon will suffer moral or physical damage..... so just you have to find the count how many number are divisible by k/l/m/n from 1 to d...and that's the answer
•  » » 22 months ago, # ^ |   0 ok.I understand this.Thank you.
•  » » 18 months ago, # ^ |   0 good stuff G
•  » » 15 months ago, # ^ |   0 Nice explanation
•  » » 11 months ago, # ^ |   0 Thx <3
•  » » 5 days ago, # ^ |   0 Very clear explanation, thank you❤