• # Withdraw without any incident

Question related to mission ATM

 

Withdraw without any incident

120 - 10 - 0.5 - 1% (10*0.01) = floor(109.4) = 109

109 - 20 - 0.5 - 1% (20*0.01) = floor(88.3) = 88

88 - 30 - 0.5 - 1%(30*0.01) = floor(57.2) = 57

checkio([120, [10, 20, 30]]) == 57 checkio([120, [200, 10]]) == 109 checkio([120,[3, 10]]) == 109 checkio([120, [200 , 119]]) == 120 checkio([120, [120, 10, 122, 2, 10, 10, 30, 1]]) == 56