6510
searching PlanetScale…
- 1.▲
- 2.▲
- 3.▲
- 4.▲
- 5.▲
- 6.▲
21 ms·
- 451.▲
- 452.▲
- 453.▲
- 454.▲
- 455.▲
- 456.▲
- 457.▲
- 458.▲
- 459.▲
- 460.▲
- 461.▲
- 462.▲
- 463.▲
- 464.▲
- 465.▲
- 466.▲
- 467.▲
- 468.▲
- 469.▲
- 470.▲
One level of nested for loop for each type of coin. (Run them until i*coin is larger than the input) Populate a 2d lookup array. $7,50 becomes arr[750] = [7,1,0,0,0,0] which represents [7x100,1x50,0x25,0x10,0x5,0x1] With each loop check if - 471.▲
- 472.▲
- 473.▲
- 474.▲
- 475.▲
- 476.▲
- 477.▲
- 478.▲
- 479.▲
- 480.▲
More ›