Ad
  • Custom User Avatar

    approved some time ago

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Already fixed.

  • Custom User Avatar
  • Default User Avatar

    This is an easy fix. You only have one prime divisor in b if b = 2.

  • Default User Avatar

    I have never actually thought about it. But I have had some real trouble with using Test.assertEquals when comparing string results instead of Test.assertDeepEquals, so I just use the latter all the time. You can test it by modifying one of the fixed tests to see if it gives you the right answer.

    I see you haven't approved this JS version.

  • Custom User Avatar

    Added

  • Custom User Avatar

    Added

  • Default User Avatar

    here is the code of the linked one

    <table class="wikitable sortable jquery-tablesorter">
    
    <thead><tr>
    <th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending"> Command </th>
    <th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending"> Definition
    </th></tr></thead><tbody>
    <tr>
    <td> + </td>
    <td> Add 1 to the current cell
    </td></tr>
    <tr>
    <td> - </td>
    <td> Subtract 1 from the current cell
    </td></tr>
    <tr>
    <td> > </td>
    <td> Move the cell pointer 1 space to the right
    </td></tr>
    <tr>
    <td> < </td>
    <td> Move the cell pointer 1 space to the left
    </td></tr>
    <tr>
    <td> c </td>
    <td> "Copy" the current cell
    </td></tr>
    <tr>
    <td> p </td>
    <td> Paste the "copied" cell into the current cell
    </td></tr>
    <tr>
    <td> W </td>
    <td> While loop - While the current cell is not equal to 0
    </td></tr>
    <tr>
    <td> E </td>
    <td> Closing character for loops
    </td></tr>
    <tr>
    <td> P </td>
    <td> Output the current cell's value as ascii
    </td></tr>
    <tr>
    <td> N </td>
    <td> Output the current cell's value as an integer
    </td></tr>
    <tr>
    <td> T </td>
    <td> Multiply the current cell by 2
    </td></tr>
    <tr>
    <td> Q </td>
    <td> Square the current cell
    </td></tr>
    <tr>
    <td> U </td>
    <td> Square root the current cell's value
    </td></tr>
    <tr>
    <td> L </td>
    <td> Add 2 to the current cell
    </td></tr>
    <tr>
    <td> I </td>
    <td> Subtract 2 from the current cell
    </td></tr>
    <tr>
    <td> V </td>
    <td> Divide the current cell by 2
    </td></tr>
    <tr>
    <td> A </td>
    <td> Add the copied value to the current cell's value
    </td></tr>
    <tr>
    <td> B </td>
    <td> Subtract the copied value from the current cell's value
    </td></tr>
    <tr>
    <td> Y </td>
    <td> Multiply the current cell's value by the copied value
    </td></tr>
    <tr>
    <td> D </td>
    <td> Divide the current cell's value by the copied value.
    </td></tr></tbody><tfoot></tfoot></table>