Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks, I thought doing it this way might be really slow but after some testing it appears that even with large inputs it doesn't take long to calculate.