CSSE1001 Assignment 1
In category Geebin on 10 Apr 2006 @ 03:42 am
I told everyone I was going to stay up and do my assignment... and so I did. It involved checking for permutation pairs of digits where the second digit is 8/5 of the first.
I'm not going to put code online because that's a 100% sure way of having someone steal it so I'll put a printout of my program here so other people can check me but not be able to get any ideas on how to solve the problem
I have also started writing a summary of the course for my revision before the final exam. If only I could be this efficient without buying a dozen energy drinks.
I'm not going to put code online because that's a 100% sure way of having someone steal it so I'll put a printout of my program here so other people can check me but not be able to get any ideas on how to solve the problem
> (all-permuter-miles 0 30000)
((0 . 0) (1260 . 2016) (4065 . 6504) (5940 . 9504) (11940 . 19104) (12195 . 19512) (12600 . 20160) (16260 . 26016) (19320 . 30912) (20325 . 32520) (21345 . 34152) (23880 . 38208) (24390 . 39024) (25470 . 40752) (27345 . 43752) (28455 . 45528) (29745 . 47592))
((0 . 0) (1260 . 2016) (4065 . 6504) (5940 . 9504) (11940 . 19104) (12195 . 19512) (12600 . 20160) (16260 . 26016) (19320 . 30912) (20325 . 32520) (21345 . 34152) (23880 . 38208) (24390 . 39024) (25470 . 40752) (27345 . 43752) (28455 . 45528) (29745 . 47592))
> (all-permuter-miles 0 0)
()
I think you will all find that I have a correct solution, please point out a mistake if you find one. At the moment there is one place where I can increase efficency if I work out how to quickly find the length of a number, (i.e. 1234567 is 7 digits long). My entire assignment being 12 actual lines of code long (that's with extra line-breaks to improve readability).()
I have also started writing a summary of the course for my revision before the final exam. If only I could be this efficient without buying a dozen energy drinks.




# Comment by thei on 11 Apr 2006 @ 03:36 pm
http://the-i.org/