Cody

James

4
Rank
40
Badges
26780
Score

Activities

1 – 50 of 3,557

James submitted a Comment to Problem 44630. Guess the number I'm thinking of

I figured out why Tim's solution scored higher than mine. My code gave me half credit for a few oddball cases where there was a tie between two of us but the third person was closer to the correct number. It didn't happen enough for the solution to fail the tests, but it was still sub-optimal.

on 16 May 2018 at 17:39

James submitted a Comment to Solution 1529547

You're *very* close with this one. Remember that r is input as a double, not a string.

on 16 May 2018 at 17:32

James submitted a Comment to Solution 1529308

Originally, this problem was scored by how quickly the code solved the problem. The Cody team changed the method of scoring at some point, so the method I used for setting the score proportional to the time spent solving the problem is no longer valid. There are a couple of other problems I have created that have the same issue.

on 16 May 2018 at 11:52

James submitted a Comment to Problem 44630. Guess the number I'm thinking of

Understood, and I agree that a three-way draw (not possible with the current rule set) should definitely be scored differently than a two-way draw. My code worked, although not quite as well as Tim's. I'll have to check the algorithms he used to generate his solution, and see how it differs from mine.

on 14 May 2018 at 14:35

James submitted a Comment to Problem 44630. Guess the number I'm thinking of

In some cases, it would be strategically beneficial to guess the same number as one of your opponents. For example, if they guess 7 and 9, for example, you would generally earn more points guessing 7 than any other number, as you would earn an extra half point from the draw if the number is 7 or 8 (which is a three-way draw) and not lose any of the full points if the number is 1-6.

on 11 May 2018 at 15:04

James submitted a Comment to Solution 1517092

It works in base 13.

on 4 May 2018 at 19:32

James received Indexing IV Master badge

on 1 May 2018 at 15:15

James submitted a Comment to Solution 1210322

Just noticed the issues that some people were having with this problem. I added a "%%" at the start of the test suite, which has helped in the past. Rescoring the two solutions that you have commented on fixed your problems. Your hard coded answer now works, and all three of the test cases show up in your test suite.

on 10 Apr 2018

James submitted a Comment to Problem 44523. Pattern Sum

After some experimentation, I found that you need to multiplying the digit by the increasing powers of 10. The first term is a*10^0. The second term is a*10^1. The third term is a*10^2, and so on. So (10,4) would be 10+100+1000+10000. Granted, the problem statement says "single digit" so 10 and 56 shouldn't really be valid numbers, but we've all messed up problem descriptions and test suites before.

on 2 Mar 2018

James submitted Solution 1453575 to Problem 44257. Read it !

on 1 Mar 2018

James submitted a Comment to Solution 1283190

I just got the heads up that my original solution to this problem had been nullified when this problem showed up on my "not solved" listing. Out of curiosity, I entered 100 as my entry, and it told me that there were two other entries with that number. If I understand the suite correctly, and it's still working as it should, your "100" solution should probably have worked, David.

on 27 Feb 2018

James submitted a Comment to Solution 1449767

It's about time you learned how to cheat properly, Corneli. I was wondering how many more switch/case and if/then solutions you were going to submit...

on 26 Feb 2018

James received Strings II Master badge

on 15 Feb 2018

James submitted a Comment to Solution 1255495

You are correct that the test suite is messed up. I just submitted one with the correct Morse Code string for '(' [which failed], and one with the incorrect substitution [which passed].

on 15 Feb 2018

James received Strings III Master badge

on 15 Feb 2018

James received Cody Challenge Master badge

on 13 Feb 2018

James submitted a Comment to Problem 43601. Find the sines of an isosceles triangle when given its area and height

I think there might still be some issues with the test suite, Grant. Currently, only test suites 1 and 3 have sum(arcsind(y_correct))=180 within a degree. For test suite 3, you need to take 180-arcsind(y_correct(3)) to get the sum to equal 180, but the sines of those two angles are still the same. Please let me know if I am missing something - If you take the arcsin for the current answers for problem 2 (y_correct = [0.7174 0.7174 0.8608]), you get angles in degrees of [49.84 49.84 59.41], which does not add up to 180 degrees. If you take 180-59.41 to keep the sine of angle #3 consistent, you end up with a sum greater than 180 degrees. Since this example is two 3-4-5 right triangles joined together at the 4-side (since height=4 and Area=12), I think the answer for case 2 should be [0.8 0.8 0.96].

on 1 Feb 2018

1 – 50 of 3,557