My code:
https://ide.codingblocks.com/s/63938
I know this is not DP but I am applying a naive approach.
How is it wrong?
My code:
https://ide.codingblocks.com/s/63938
I know this is not DP but I am applying a naive approach.
How is it wrong?
Hi Anant, consider the following test case:
Input:
2
150
250
Expected Output:
5832
38880
Your code’s output:
204
339
So, your code is not giving correct output for all test cases.
check this https://ide.codingblocks.com/s/64308
in ur code 69 will be in array beacuse its modulus of 3 is 0 but 13 is also factor of 69 so u have to check number again.
Thank you Khushboo!!
Thank you, I got it now.