A company builds towers with bricks. The company can build two types of towers: impressive and regular. It takes the company 1024 bricks to build impressive towers and 256 bricks to build regular towers. The company makes the most gain by building impressive towers: CDN$10000 each. Regular towers produce less gain but still some: a regular tower provides the company CDN$ 2000 gain. On the other hand, the company loses CDN$ 20 per brick not used. Thus, the company will attempt to make as many impressive towers as possible, and then as many regular towers as possible.
This function receives as input parameter a number of bricks and it should return a string with the following information: first, the number of impressive towers to build, followed by two dots ("..") followed by the number of regular towers to build, followed again by two dots, followed by the number of unused bricks, followed by two dots and finally the money the company makes, considering the gains (becuase of the towers) minus the losses (becasue of the unused bricks).
bricksAndTowers(1027) should return '1..0..3..9940', because with 1027 bricks one impressive tower can be built (the first 1 in the string), no regular towers can be built (0) and there are 3 unused bricks. The company makes CDN$ 9940, that is, CDN$10000 because of the impressive tower minus CDN$ 60 (CDN$20 per each of the 3 unused bricks).
Notice that the company may have a net loss, when there are not enough bricks to build any tower.
bricksAndTowers(10) should return '0..0..10..-200'