Sunday, October 5, 2014

ACM 1327. Fuses / Предохранители

The task statement might be a little confusing , here is what it asks for, there is a machine which has a fuse and after each time it is launched the fuse dies, where the next day the machine is not working because the fuse is being replaced. So on the first day the machine works, then on the second day the fuse is dead and it is being replaced, on the third day the machine works again with the new fuse, and then the fuse dies and on the forth day the new fuse will be placed and so on, => on the odd number of days the machine works and on the even numbers the machine doesn't work and we need to calculate how many days the machine will work in the interval [A,B].


       FULL SOURCE CODE

No comments:

Post a Comment