John D'Errico
1054
1054
Rank7
7
Badges1576
1576
Score
John D'ErricolikedProblem 42936. Project Euler: Problem 11, Largest product in a grid on 16 Jul 2021 |
John D'ErricosubmittedSolution 5684500toProblem 42404. Divisible by 2 on 4 May 2021 |
John D'ErricosubmittedSolution 5684460toProblem 42404. Divisible by 2 on 4 May 2021 |
John D'ErricoreceivedQuiz Masterbadge forSolution 2931295 on 10 Sep 2020 |
John D'Erricosubmitted aCommenttoProblem 43642. Euclidean distance from a point to a polynomial
I'm enjoying these creative solutions.
on 4 May 2018 |
John D'Erricosubmitted aCommenttoProblem 1428. Find the optimal shape to bring the maximum product by a given perimeter
我更新了问题解释更多clear. I also repaired the checks for a valid solution to use a relative test, mainly valuable for one of the cases where an absolute test on the error was a poor choice.
on 26 Mar 2018 |
John D'Erricosubmitted aCommenttoProblem 1428. Find the optimal shape to bring the maximum product by a given perimeter
I took a look at the test cases. The 4th test has a result that is expected to be on the order of 1e40. Then it compares that to the solution returned, and tests to see if the absolute difference is less then 1e-4? eps(1e40) is roughly 1e24. So the difference between two numbers of size 1e40 will never be less than 1e-4, unless they are IDENTICAL. Far better would be to test if the relative difference is small.
on 26 Mar 2018 |
John D'ErricosubmittedSolution 1471543toProblem 1443. Edges of a n-dimensional Hypercube on 26 Mar 2018 |
John D'ErricosubmittedSolution 1471539toProblem 1443. Edges of a n-dimensional Hypercube on 26 Mar 2018 |
John D'ErricosubmittedSolution 1471534toProblem 1444. Dots in a Circle on 26 Mar 2018 |
John D'ErricosubmittedSolution 1471533toProblem 1444. Dots in a Circle on 26 Mar 2018 |
John D'ErricosubmittedSolution 1447302toProblem 44480. The average of the second largest values on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447301toProblem 44480. The average of the second largest values on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447299toProblem 44480. The average of the second largest values on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447297toProblem 1946. Fibonacci-Sum of Squares on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447292toProblem 1442. Volume of a Simplex on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 1442. Volume of a Simplex
Good problem, in the sense that it disallows many of the hacks used to cook a problem.
on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447286toProblem 1141. Volume difference between Ellipsoid and Sphere on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447280toProblem 1385. Perimeter on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447279toProblem 1385. Perimeter on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447273toProblem 434. Return the Fibonacci Sequence on 22 Feb 2018 |
John D'ErricosubmittedSolution 1447267toProblem 434. Return the Fibonacci Sequence on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 525. Mersenne Primes
No. 2047 is not a Mersenne prime. 2047=23*89, even though it is true that 2047=2^11-1.
on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446399toProblem 981. Find nearest prime number less than input number on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446396toProblem 981. Find nearest prime number less than input number on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446394toProblem 981. Find nearest prime number less than input number on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 981. Find nearest prime number less than input number
I removed the test case where n==2, since 1 is indeed not a prime number. I also added a random test case, so the problem is not so easily cooked by knowing all the test cases.
on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446378toProblem 1119. sum of non-primes on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 1119. sum of non-primes
I've now fixed the problem statement to be consistent.
on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 241. Project Euler: Problem 7, Nth prime
Sadly, I see there are too few test cases, and the problem is too easy to cook.
on 22 Feb 2018 |
John D'ErricolikedProblem 241. Project Euler: Problem 7, Nth prime on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoProblem 241. Project Euler: Problem 7, Nth prime
Aw drat. I was going to submit the n'th prime problem until I saw this.
on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446359toProblem 44385. Extra safe primes on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446358toProblem 44385. Extra safe primes on 22 Feb 2018 |
John D'ErricosubmittedSolution 1446353toProblem 44385. Extra safe primes on 22 Feb 2018 |
John D'Erricosubmitted aCommenttoSolution 1278460
Tabulate could probably be made to work here, but I recall that Cody does not allow toolbox functions, and tabulate lives in the stats toolbox. I'd guess the logic is that not everyone has all toolboxes, so a solution that uses some tool that others cannot use would not be fair to those others.
on 21 Feb 2018 |
John D'ErricosubmittedSolution 1446315toProblem 2736. Pernicious Anniversary Problem on 21 Feb 2018 |
John D'ErricosubmittedSolution 1446314toProblem 2736. Pernicious Anniversary Problem on 21 Feb 2018 |
John D'ErricosubmittedSolution 1446311toProblem 2736. Pernicious Anniversary Problem on 21 Feb 2018 |
John D'ErricosubmittedProblem 43642. Euclidean distance from a point to a polynomialtoCommunity on 28 Oct 2016 |
John D'Erricosubmitted aCommenttoProblem 43564. Calculate sin(x) without sin(x)
You could at least bother to write a reference solution.
on 17 Oct 2016 |
John D'Erricosubmitted aCommenttoProblem 43567. i forgot to use capital I
没有提供参考解决方案。
on 17 Oct 2016 |
John D'Erricosubmitted aCommenttoSolution 553580
A very good reason why it would NOT work. You returned a double precision number. But a double can only store integers correctly as large as 2^53-1.
on 13 Oct 2016 |
John D'Erricosubmitted aCommenttoProblem 43329. Solve expression II
Note that this problem uses the word solve when it needs to say EVALUATE.
on 13 Oct 2016 |
John D'Erricosubmitted aCommenttoProblem 43326. Solve expression I
Note that this problem uses the word solve when it needs to say EVALUATE.
on 13 Oct 2016 |
John D'Erricosubmitted aCommenttoProblem 43330. Solve expression III
Note that this problem uses the word solve when it needs to say EVALUATE.
on 13 Oct 2016 |
John D'ErricolikedProblem 43494. Weighted Convolution on 13 Oct 2016 |
John D'ErricoreceivedPromoterbadge forProblem 43494. Weighted Convolution on 13 Oct 2016 |