Link to Problem In this question we need to find the smallest possible number of resistors he needs to make an element using 1 ohm resistor The any solution which got accepted gives 6 as answer for test case a=6 b=5 (R=6/5) while this can be done using 5 resistors : 3 1 ohm resistor in series which is in parallel with 2 1 ohm resistor in series. So,I think the solution is wrong. Can someone justify the solution against this testcase?