Python Program for Find largest prime factor of a number
Given a positive integer \’n\'( 1 <= n <= 1015). Find the largest prime factor of a number.
Input: 6 Output: 3 Explanation Prime factor of 6 are- 2, 3 Largest of them is \'3\' Input: 15 Output: 5
- Python3
Output:
5 328513
Time complexity:
Auxiliary space:
Please refer complete article on Find largest prime factor of a number for more details!
No comments:
Post a Comment
Your feedback is highly appreciated and will help us to improve our content.