The problem number is 148A-"Insomnia Cure", i can not understand the problem...
# | User | Rating |
---|---|---|
1 | tourist | 3671 |
2 | jiangly | 3653 |
3 | Um_nik | 3629 |
4 | Benq | 3513 |
5 | ksun48 | 3486 |
6 | MiracleFaFa | 3466 |
7 | slime | 3452 |
8 | maroonrk | 3422 |
9 | Radewoosh | 3406 |
10 | greenheadstrange | 3393 |
# | User | Contrib. |
---|---|---|
1 | awoo | 187 |
2 | YouKn0wWho | 182 |
3 | -is-this-fft- | 181 |
4 | Monogon | 177 |
4 | Um_nik | 177 |
6 | antontrygubO_o | 170 |
7 | maroonrk | 167 |
8 | adamant | 164 |
9 | SecondThread | 162 |
10 | SlavicG | 161 |
The problem number is 148A-"Insomnia Cure", i can not understand the problem...
Name |
---|
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.
Thank you,achaitanyasai! It was very helpful.
My pleasure :)
Perfect Answer
thanks!
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
check my commnet
why i divide by k,l,m,n??I could not understand.
check my comment
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
ok.I understand this.Thank you.
good stuff G
Nice explanation
Thx <3
Very clear explanation, thank you❤