Problem 42913. Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: -------------
The divisors of 12 are: 1,2,3,4,6 and 12.
The largest divisor of 12 that does not exceed the square root of 12 is 3.
We shall call the largest divisor of an integer n that does not exceed the square root of n the pseudo square root (PSR) of n.
It can be seen that PSR(3102)=47.
-------------
Write a MATLAB script that will determine what the pseudo square root of a number is. Please note that if the number is a perfect square, the pseudo square root will equal the actual square root.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers47
Suggested Problems
-
Renaming a field in a structure array
1477 Solvers
-
Check if number exists in vector
10731 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
620 Solvers
-
Return fibonacci sequence do not use loop and condition
520 Solvers
-
59 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!