[Community Puzzle] Blowing Fuse


#1

https://www.codingame.com/training/easy/blowing-fuse

Send your feedback or ask for help here!

Created by @java_coffee_cup,validated by @bbb000bbbyyy,@Niako and @GeoConHD.
If you have any issues, feel free to ping them.


#2

Hi there, i’ve been trying to solve this puzzle but i think i found an error on the expected result on the Case 04 ( More Devices ) or in the instructions: According to instructions one click will turn the device ON and a second will turn it OFF. Do it in by hand if thats the case:

Clicks - Device
1 - 10
2 - 0 - 10
3 - 10 - 0 - 14
4 - 0 - 10 - 0- 14
5 - 10 - 0 - 14- 0 - 14
6 - 0 - 10 - 0- 14 - 0 - 15

That means the Max AMP consumption is 39Amps when i click 6 times. and the answer was 49? then i think im missing something or the instructions should be clearer, because with that it never hits 49amps, could you clarify?

Thanks in advance


#3

By input line 3,
the first click is on device #4, which consumes 14 units.


#4

Instructions should be clearer, i really didn’t understand your reply ( your reply just confirms what i posted )

Intructions:
Each click on a button will toggle the power status - when the power is OFF, a click will turn it ON. The next click will turn it OFF. ( did you mean first click turns it on, second turns it off, then third turns off and stays off the rest of the clicks?, because the way the instructions are is: that is on next click will turn off and so on and in that way, this remains and it never hits 49amps not even with 6 clicks

first click - On first device 10amps - 10 amps total
second click - off first device and on second device 10amps - 10 amps total
third click - on first device 10amps, off second device, on third device 14 amps - 24amps total
fourth click - off first device, on second device 10amps, off third device, on fourth device 14amps - 24amps total
fifth click - on first device 10amps, off second device, on third device 14amps, off fourth device, on fifth device 14amps - 38amps total
sixth click - off first device, on second device 10amps, off third device, on fourth device 14amps, off fifth device, on sixth device 15amps - 39Amps total


#5

In that test case,
according to instruction, the first click is not clicking on the first device.
It is clicking on the 4th device, because the third line reads: 4 3 3 5 4 1 5…
The second click is on the 3rd device.