
962 - Taxicab Numbers
Moderator: Board moderators
Is my alogorithm is right:
Thanks
Keep posting
Sapnil
Code: Select all
1. store 1^3,2^3.....less than 1001000001 in array A
2. then i generate all distinct pair some of number in A(i also generate 1^3+1^3,2^3+2^3,..,) && store them.
3. Make a decision that if a sum occure more than ones then this is a taxi cab number
Keep posting
Sapnil
"Dream Is The Key To Success"
@@@ Jony @@@
@@@ Jony @@@