Python: Writing a program using recursion to determine the sum of factor (how to make more efficient) -


एक्स = तथ्य == 0: if fact> gt; = x / तथ्य: वापसी तथ्य + एक्स / तथ्य + sof (x, तथ्य - 1) अन्य: वापसी 1 और: रिटर्न sof (x, fact-1)

मैं इस कार्यक्रम को और अधिक कैसे कर सकता हूं कुशल रनटाइम बुद्धिमान? मैं व्यक्तिगत रूप से विचारों से थक चुका हूं।


Comments

Popular posts from this blog

c# - Reactive Extensions ControlScheduler -

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -