f# stackoverflow project euler #4

前端 未结 2 477
太阳男子
太阳男子 2020-12-19 21:09

I\'m working on problem four of Project Euler and am running into a stackoverflow exception. I\'m not asking for help on solving the problem, I\'d just like it explained

2条回答
  •  一整个雨季
    2020-12-19 21:47

    I can't read F# and don't know if your problem is related to this but especially if you're doing something recursive avoid checking for equality to a number, instead try to check for a threshold. For example, instead of testing n = 0, test n <= 0.

提交回复
热议问题