Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.

You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.

A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.

Ad
Ad
Code
Diff
  • maxnum=lambda n:int(''.join(sorted(str(n),reverse=1)))
    • def maxnum(number):
    • lista = []
    • result = ""
    • for char in str(number):
    • lista.append(char)
    • lista.sort(reverse = True)
    • for char in lista:
    • result = result + char
    • return int(result)
    • maxnum=lambda n:int(''.join(sorted(str(n),reverse=1)))
Code
Diff
  • const firstNonRepeatingCharacter = (str) => {
      let nonRepeatingCharacter = '';
      const repeatingCharacters = {};  
      str.split('').map(char => ((repeatingCharacters[char] = (repeatingCharacters[char] ?? 0) + 1)));
      for(const [key, value] of Object.entries(repeatingCharacters)) {
        if (nonRepeatingCharacter !== '') break;
        if (value === 1) nonRepeatingCharacter = key;
      }
      return nonRepeatingCharacter||null;
    };
    • const firstNonRepeatingCharacter = (str) => {
    • let nonRepeatingCharacter = '';
    • const repeatingCharacters = {};
    • for(let char of str) {
    • repeatingCharacters[char] === undefined ? repeatingCharacters[char] = 1 : repeatingCharacters[char] += 1
    • }
    • const repeatingCharacters = {};
    • str.split('').map(char => ((repeatingCharacters[char] = (repeatingCharacters[char] ?? 0) + 1)));
    • for(const [key, value] of Object.entries(repeatingCharacters)) {
    • if (nonRepeatingCharacter !== '') break;
    • if (value === 1) nonRepeatingCharacter = key;
    • }
    • return nonRepeatingCharacter !== '' ? nonRepeatingCharacter : null;
    • return nonRepeatingCharacter||null;
    • };

and here's dropping the entire output for bigger context

Code
Diff
  • print("""\
    <div><h2 class="failed">Test Results:</h2><!----><div class="run-results__result-items"><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Playground</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Example Tests</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #1</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board0:after{ content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a . 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim0 1s infinite; } @keyframes anim0 { 0% {
          content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a . 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a 3 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  } </style><span class="board0"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 3ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #2</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board1:after{ content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . . . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . ."; animation: anim1 1s infinite; } @keyframes anim1 { 0% {
          content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . . . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . 2 . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . .";
        }  } </style><span class="board1"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 4ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Basic Tests</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #1</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board2:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 . | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim2 1s infinite; } @keyframes anim2 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 . | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 6 | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  } </style><span class="board2"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #2</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board3:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 ."; animation: anim3 1s infinite; } @keyframes anim3 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . 4 .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 .";
        }  } </style><span class="board3"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #3</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board4:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | . 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim4 1s infinite; } @keyframes anim4 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | . 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | 1 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  } </style><span class="board4"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #4</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board5:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | . 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . ."; animation: anim5 1s infinite; } @keyframes anim5 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | . 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | 6 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . .";
        }  } </style><span class="board5"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #5</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board6:after{ content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . . . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . ."; animation: anim6 1s infinite; } @keyframes anim6 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . . . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . 9 . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . .";
        }  } </style><span class="board6"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #6</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board7:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 . . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim7 1s infinite; } @keyframes anim7 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 . . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 7 . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
        }  } </style><span class="board7"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #7</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board8:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a . 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim8 1s infinite; } @keyframes anim8 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a . 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a 9 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . .";
        }  } </style><span class="board8"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #8</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board9:after{ content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 . | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . ."; animation: anim9 1s infinite; } @keyframes anim9 { 0% {
          content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 . | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 3 | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . .";
        }  } </style><span class="board9"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #9</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value">  <style>.board10:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 . | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . ."; animation: anim10 1s infinite; } @keyframes anim10 { 0% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 . | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . .";
        }  100% {
          content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 5 | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . .";
        }  } </style><span class="board10"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 6ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 10ms</div><!----></div></div></div></div></div><!----></div>""")
    • print("""\
    • <style>.board1:after{ content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . . . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . ."; animation: anim1 1s infinite; } @keyframes anim1 { 0% {
    • <div><h2 class="failed">Test Results:</h2><!----><div class="run-results__result-items"><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Playground</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Example Tests</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #1</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board0:after{ content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a . 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim0 1s infinite; } @keyframes anim0 { 0% {
    • content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a . 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a 1 8 9 | . . . | . . .\\a 3 2 7 | . . . | . . .\\a 6 5 4 | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } } </style><span class="board0"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 3ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #2</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board1:after{ content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . . . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . ."; animation: anim1 1s infinite; } @keyframes anim1 { 0% {
    • content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . . . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . 1 7 | . . . | . . .\\a . 2 . | . . 5 | . 6 .\\a 8 3 . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . 4 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . 9 . | . . . | . . .";
    • } } </style><span class="board1"></span>
    • """)
    • } } </style><span class="board1"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 4ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--describe result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Basic Tests</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #1</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board2:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 . | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim2 1s infinite; } @keyframes anim2 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 . | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a 9 1 6 | 2 7 3 | 4 5 8\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } } </style><span class="board2"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #2</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board3:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 ."; animation: anim3 1s infinite; } @keyframes anim3 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . 1 .\\a . . . | . . . | . 2 .\\a . . . | . . . | . 6 .\\a ------+-------+------\\a . . . | . . . | . 4 .\\a . . . | . . . | . 3 .\\a . . . | . . . | . 5 .\\a ------+-------+------\\a . . . | . . . | . 7 .\\a . . . | . . . | . 8 .\\a . . . | . . . | . 9 .";
    • } } </style><span class="board3"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #3</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board4:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | . 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim4 1s infinite; } @keyframes anim4 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | . 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | 2 3 8 | . . .\\a . . . | 1 4 5 | . . .\\a . . . | 9 7 6 | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } } </style><span class="board4"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #4</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board5:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | . 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . ."; animation: anim5 1s infinite; } @keyframes anim5 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | . 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | 4 . .\\a ------+-------+------\\a . . . | 3 . . | 6 2 1\\a . . . | . . . | . . .\\a . . . | . . . | . . 8\\a ------+-------+------\\a . . . | . . . | 5 . .\\a . . . | . . . | 7 . .\\a . . . | . . . | 9 . .";
    • } } </style><span class="board5"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #5</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board6:after{ content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . . . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . ."; animation: anim6 1s infinite; } @keyframes anim6 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . . . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . 3 . | . . .\\a . . . | . 2 . | . . .\\a . . . | . 1 . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . 8 | . 9 . | 7 . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . 4 . | . . .\\a . . . | . 5 . | . . .\\a . . . | . 6 . | . . .";
    • } } </style><span class="board6"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #6</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board7:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 . . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim7 1s infinite; } @keyframes anim7 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 . . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 1 7 . | 2 . . | 3 . .\\a 9 . 4 | . . . | . . .\\a ------+-------+------\\a . 5 . | . . . | . . .\\a . 6 . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . 8 . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . . | . . .";
    • } } </style><span class="board7"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><!----><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #7</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board8:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a . 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . ."; animation: anim8 1s infinite; } @keyframes anim8 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a . 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a 6 . . | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a 1 . 7 | . . . | . . .\\a 9 2 8 | . . . | . . .\\a 3 . . | . . . | . . .\\a ------+-------+------\\a 4 . . | . . . | . . .\\a 5 . . | . . . | . . .\\a . . . | . . . | . . .";
    • } } </style><span class="board8"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #8</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board9:after{ content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 . | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . ."; animation: anim9 1s infinite; } @keyframes anim9 { 0% {
    • content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 . | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . 1 | . . . | . . .\\a . 5 3 | . . . | . . .\\a 7 6 9 | . . . | . . .\\a ------+-------+------\\a . . 2 | . . . | . . .\\a . . 8 | . . . | . . .\\a . . . | . . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . 4 | . . . | . . .";
    • } } </style><span class="board9"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--tree py-1 my-1 result-type--it result-type--tree--expanded"><div class="cursor-pointer inline-flex items-start justify-center space-x-0.5"><div class="failed"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div><span class="run-value result-type__value result-type__value--failed leading-relaxed" ignore-escape="true">Test #9</span></div><!----><!----></div><div><div class="ml-5"><div><div class="result-type--log my-1.5 result-type--expanded p-1" collapsed="false"><div class="result-type__tabs py-0.5 flex items-center justify-start"><label class="inline-flex items-start justify-center space-x-0.5 active"><span class="result-type__chevron"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4 mt-0.5"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></span><span class="leading-relaxed">Log</span></label></div><div class="mt-1 p-1"><span class="run-value run-value--html result-type__value"> <style>.board10:after{ content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 . | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . ."; animation: anim10 1s infinite; } @keyframes anim10 { 0% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 . | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . .";
    • } 100% {
    • content: "\\a All solutions:\\a \\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 2 | . . .\\a ------+-------+------\\a . . . | . . 1 | . . .\\a . 6 7 | 8 4 5 | . . .\\a . . . | 9 . . | . . .\\a ------+-------+------\\a . . . | . . . | . . .\\a . . . | . . . | . . .\\a . . . | . . 3 | . . .";
    • } } </style><span class="board10"></span></span></div></div><!----></div><div><div class="result-type--result flex flx-row py-1 failed" collapsed="false"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="w-4 h-4 grow-0 shrink-0 basis-4"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg><span class="result-type__value ml-1.5 failed">r2c1=4 is not a valid naked single: expected false to be true</span></div><!----></div><div><div class="result-type--time" collapsed="false"> Completed in 1ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 6ms</div><!----></div></div></div></div><div><div class="result-type--time" collapsed="false"> Completed in 10ms</div><!----></div></div></div></div></div><!----></div>""")
Code
Diff
  • fn hello<T: Locale>(whoever: &str) -> String {
        T::say_hello_to(whoever)
    }
    
    trait Locale {
        fn say_hello_to(whoever: &str) -> String;
    }
    
    struct English;
    
    impl Locale for English {
        fn say_hello_to(whoever: &str) -> String {
            format!("hello {whoever}")
        }
    }
    
    struct Pirate;
    
    impl Locale for Pirate {
        fn say_hello_to(whoever: &str) -> String {
            format!("yar {whoever}")
        }
    }
    
    struct Binary<T>(std::marker::PhantomData::<T>);
    
    impl<T: Locale> Locale for Binary<T> {
        fn say_hello_to(whoever: &str) -> String {
            T::say_hello_to(whoever)
                .chars()
                .map(|ch| format!("{:08b}", ch as u8))
                .collect()
        }
    }
    • class Locale {
    • sayHelloTo(whoever){
    • throw new Error("Not implemented");
    • }
    • fn hello<T: Locale>(whoever: &str) -> String {
    • T::say_hello_to(whoever)
    • }
    • class EnglishLocale extends Locale {
    • sayHelloTo(whoever){
    • return `hello ${whoever}`;
    • }
    • trait Locale {
    • fn say_hello_to(whoever: &str) -> String;
    • }
    • class PirateLocale extends Locale {
    • sayHelloTo(whoever){
    • return `yar ${whoever}`;
    • }
    • }
    • struct English;
    • class BinaryLocale extends EnglishLocale {
    • sayHelloTo(whoever) {
    • let msg = super.sayHelloTo(whoever);
    • return this.txtToBin(msg);
    • }
    • txtToBin(text) {
    • let result = [];
    • for(let character of text){
    • let binaryArr = this.numberToBinaryArray(character.charCodeAt());
    • result = result.concat(binaryArr);
    • impl Locale for English {
    • fn say_hello_to(whoever: &str) -> String {
    • format!("hello {whoever}")
    • }
    • }
    • return result.join("");
    • }
    • numberToBinaryArray(number) {
    • let result = [];
    • while(number > 0){
    • let bit = Math.floor(number % 2) != 0 ? 1 : 0;
    • result.unshift(bit)
    • number = Math.floor(number / 2);
    • }
    • struct Pirate;
    • while(result.length != 8) {
    • result.unshift(0);
    • impl Locale for Pirate {
    • fn say_hello_to(whoever: &str) -> String {
    • format!("yar {whoever}")
    • }
    • return result;
    • }
    • }
    • const GREET_LANG = {
    • ENGLISH: new EnglishLocale(),
    • PIRATE: new PirateLocale(),
    • BINARY: new BinaryLocale(),
    • }
    • struct Binary<T>(std::marker::PhantomData::<T>);
    • const hello = (whoever, lang=GREET_LANG.ENGLISH) => lang.sayHelloTo(whoever);
    • impl<T: Locale> Locale for Binary<T> {
    • fn say_hello_to(whoever: &str) -> String {
    • T::say_hello_to(whoever)
    • .chars()
    • .map(|ch| format!("{:08b}", ch as u8))
    • .collect()
    • }
    • }
Code
Diff
  • export function findTheLongestWord (sentence?: string): string{
      // You Can Code Below Here  
        if (sentence === undefined) {
            return 'gaboleh undefined'
        }
      
        if (sentence === null) {
            return 'gaboleh null'
        }
      
        if (typeof sentence !== 'string') {
           return 'harus string'
        }
    
        if (sentence.trim() === "") {
            return 'gaboleh kosong'
        }
    
        const split = sentence.split(/\s+/);
        let terpanjang = "";
        let panjang = 0;
        let multi = false;
    
        for (const row of split) {
            if (row.length > panjang) {
                terpanjang = row;
                panjang = row.length;
                multi = false;
            } else if (row.length === panjang) {
                multi = true;
            }
        }
    
        if (multi) {
            return "no longest word found";
        } else {
            return `${terpanjang}: ${panjang} chars`;
        }
    }
    
    findTheLongestWord()
    findTheLongestWord("I love Nagatech")
    findTheLongestWord("Programmer use Typescript")
    findTheLongestWord("Determine the Injustice")
    findTheLongestWord("Nagatech Sistem Integrator")
    findTheLongestWord("NGTC")
    findTheLongestWord("Kamu ska Typescript")
    • export function findTheLongestWord (sentence?: string): string{
    • // You Can Code Below Here
    • return ``
    • }
    • if (sentence === undefined) {
    • return 'gaboleh undefined'
    • }
    • if (sentence === null) {
    • return 'gaboleh null'
    • }
    • if (typeof sentence !== 'string') {
    • return 'harus string'
    • }
    • if (sentence.trim() === "") {
    • return 'gaboleh kosong'
    • }
    • const split = sentence.split(/\s+/);
    • let terpanjang = "";
    • let panjang = 0;
    • let multi = false;
    • for (const row of split) {
    • if (row.length > panjang) {
    • terpanjang = row;
    • panjang = row.length;
    • multi = false;
    • } else if (row.length === panjang) {
    • multi = true;
    • }
    • }
    • if (multi) {
    • return "no longest word found";
    • } else {
    • return `${terpanjang}: ${panjang} chars`;
    • }
    • }
    • findTheLongestWord()
    • findTheLongestWord("I love Nagatech")
    • findTheLongestWord("Programmer use Typescript")
    • findTheLongestWord("Determine the Injustice")
    • findTheLongestWord("Nagatech Sistem Integrator")
    • findTheLongestWord("NGTC")
    • findTheLongestWord("Kamu ska Typescript")
Code
Diff
  • interface ListOfBoxes {
      code: string;
      bomb?: boolean;
      boxes?: ListOfBoxes[];
    }
    
    export function findTheBomb (listOfBoxes: ListOfBoxes [], path: string[] = []): string | null {
      // You Can Code Below Here  
      if(listOfBoxes.length > 0){
        for (const box of listOfBoxes) {
            const newPath = [...path, box.code];
            if (box.bomb) {
                return newPath.join(" > ");
            }
            if (box.boxes) {
                const found = findTheBomb(box.boxes, newPath);
                if (found) {
                    return found;
                }
            }
        }
        return null;
      }else{
        return "No Boxes No Bomb!"
      }
    }
    
    const listBoxes1: ListOfBoxes [] = [
      {
        code: "B1",
        boxes: [
          {
            code: "B1.1"
          },
          {
            code: "B1.2"
          }
        ]
      },
      {
        code: "B2",
        boxes: [
          {
            code: "B2.1",
            boxes: [
              {
                code: "B2.1.1"
              },
              {
                code: "B2.1.2",
                bomb: true
              }
            ]
          },
          {
            code: "B2.2"
          }
        ]
      }
    ]
    const listBoxes2: ListOfBoxes [] = [
      {
        "code": "B1.2",
        "boxes": [
          {
            "code": "B1.2.2",
            "boxes": [
              {
                "code": "B1.2.2.6"
              }
            ]
          },
          {
            "code": "B1.2.7"
          },
          {
            "code": "B1.2.4"
          },
          {
            "code": "B1.2.0"
          },
          {
            "code": "B1.2.9",
            "boxes": [
              {
                "code": "B1.2.9.0",
                "bomb": true,
              }
            ]
          }
        ]
      },
      {
        "code": "B2.8",
        "boxes": [
          {
            "code": "B2.8.0"
          },
          {
            "code": "B2.8.7"
          },
          {
            "code": "B2.8.6"
          },
          {
            "code": "B2.8.3"
          }
        ]
      },
      {
        "code": "B3.6",
        "boxes": [
          {
            "code": "B3.6.5"
          },
          {
            "code": "B3.6.7",
            "boxes": [
              {
                "code": "B3.6.7.9"
              }
            ]
          }
        ]
      }
    ]
    const listBoxes3: ListOfBoxes [] = [
      {
        "code": "B1.6",
        "boxes": [
          {
            "code": "B1.6.9"
          },
          {
            "code": "B1.6.2"
          }
        ]
      },
      {
        "code": "B2.4",
        "boxes": [
          {
            "code": "B2.4.0"
          },
          {
            "code": "B2.4.3",
            "boxes": [
              {
                "code": "B2.4.3.9",
                "bomb": true
              }
            ]
          },
          {
            "code": "B2.4.7"
          }
        ]
      }
    ]
    
    findTheBomb([])
    findTheBomb(listBoxes1);
    findTheBomb(listBoxes2);
    findTheBomb(listBoxes3);
    • interface ListOfBoxes {
    • code: string,
    • bomb?: boolean,
    • boxes?: ListOfBoxes[]
    • code: string;
    • bomb?: boolean;
    • boxes?: ListOfBoxes[];
    • }
    • export function findTheBomb (listOfBoxes: ListOfBoxes[]): string{
    • export function findTheBomb (listOfBoxes: ListOfBoxes [], path: string[] = []): string | null {
    • // You Can Code Below Here
    • return ``
    • }
    • if(listOfBoxes.length > 0){
    • for (const box of listOfBoxes) {
    • const newPath = [...path, box.code];
    • if (box.bomb) {
    • return newPath.join(" > ");
    • }
    • if (box.boxes) {
    • const found = findTheBomb(box.boxes, newPath);
    • if (found) {
    • return found;
    • }
    • }
    • }
    • return null;
    • }else{
    • return "No Boxes No Bomb!"
    • }
    • }
    • const listBoxes1: ListOfBoxes [] = [
    • {
    • code: "B1",
    • boxes: [
    • {
    • code: "B1.1"
    • },
    • {
    • code: "B1.2"
    • }
    • ]
    • },
    • {
    • code: "B2",
    • boxes: [
    • {
    • code: "B2.1",
    • boxes: [
    • {
    • code: "B2.1.1"
    • },
    • {
    • code: "B2.1.2",
    • bomb: true
    • }
    • ]
    • },
    • {
    • code: "B2.2"
    • }
    • ]
    • }
    • ]
    • const listBoxes2: ListOfBoxes [] = [
    • {
    • "code": "B1.2",
    • "boxes": [
    • {
    • "code": "B1.2.2",
    • "boxes": [
    • {
    • "code": "B1.2.2.6"
    • }
    • ]
    • },
    • {
    • "code": "B1.2.7"
    • },
    • {
    • "code": "B1.2.4"
    • },
    • {
    • "code": "B1.2.0"
    • },
    • {
    • "code": "B1.2.9",
    • "boxes": [
    • {
    • "code": "B1.2.9.0",
    • "bomb": true,
    • }
    • ]
    • }
    • ]
    • },
    • {
    • "code": "B2.8",
    • "boxes": [
    • {
    • "code": "B2.8.0"
    • },
    • {
    • "code": "B2.8.7"
    • },
    • {
    • "code": "B2.8.6"
    • },
    • {
    • "code": "B2.8.3"
    • }
    • ]
    • },
    • {
    • "code": "B3.6",
    • "boxes": [
    • {
    • "code": "B3.6.5"
    • },
    • {
    • "code": "B3.6.7",
    • "boxes": [
    • {
    • "code": "B3.6.7.9"
    • }
    • ]
    • }
    • ]
    • }
    • ]
    • const listBoxes3: ListOfBoxes [] = [
    • {
    • "code": "B1.6",
    • "boxes": [
    • {
    • "code": "B1.6.9"
    • },
    • {
    • "code": "B1.6.2"
    • }
    • ]
    • },
    • {
    • "code": "B2.4",
    • "boxes": [
    • {
    • "code": "B2.4.0"
    • },
    • {
    • "code": "B2.4.3",
    • "boxes": [
    • {
    • "code": "B2.4.3.9",
    • "bomb": true
    • }
    • ]
    • },
    • {
    • "code": "B2.4.7"
    • }
    • ]
    • }
    • ]
    • findTheBomb([])
    • findTheBomb(listBoxes1);
    • findTheBomb(listBoxes2);
    • findTheBomb(listBoxes3);
Code
Diff
  • export function filteringDataMoreThanEqual (data: number[], comparator: number): string{
      const hasil = data.filter(nilai => nilai >= comparator);  
      return String(hasil);
    }
    
    const point: number[] = [20, 10, 100, 40, 5, 50];
    filteringDataMoreThanEqual(point,10)
    filteringDataMoreThanEqual(point,40)
    filteringDataMoreThanEqual(point,100)
    • export function filteringDataMoreThanEqual (data: number[], comparator: number): string{
    • return String(data);
    • }
    • const hasil = data.filter(nilai => nilai >= comparator);
    • return String(hasil);
    • }
    • const point: number[] = [20, 10, 100, 40, 5, 50];
    • filteringDataMoreThanEqual(point,10)
    • filteringDataMoreThanEqual(point,40)
    • filteringDataMoreThanEqual(point,100)
Code
Diff
  • export interface iType {
      subject: string,
      point: number
    }
    
      const data: iType[] = [
        {
            subject: "IPA",
            point: 70,
        },
        {
            subject: "MTK",
            point: 65
        }
      ];
    
    export function valueResult (data: iType[]): number {
      let value = 0;
      // You Can Code Below Here
        const totalPoint = data.reduce((total, item) => total + item.point, 0);
        const totalData = data.length;
        
        value = totalPoint / totalData;
      
      return value;
    }
    
    
      valueResult(data)
    • export interface iType {
    • subject: string,
    • point: number
    • }
    • const data: iType[] = [
    • {
    • subject: "IPA",
    • point: 70,
    • },
    • {
    • subject: "MTK",
    • point: 65
    • }
    • ];
    • export function valueResult (data: iType[]): number {
    • let value = 0;
    • // You Can Code Below Here
    • const totalPoint = data.reduce((total, item) => total + item.point, 0);
    • const totalData = data.length;
    • value = totalPoint / totalData;
    • return value;
    • }
    • }
    • valueResult(data)
Code
Diff
  • export interface iType{
        id: number,
        name: string,
      }
      
      const datas: iType[] = [
        {
            id: 1,
            name: "Manny"
        },
        {
            id: 2,
            name: "Danny"
        },
        {
            id: 3,
            name: "Socciella"
        },
      ];
      export function findData ( data: iType[],selectedData: number): iType | undefined {
        return data.find(item => item.id === selectedData);
      }
      
      
      findData(datas,1);
      findData(datas,2);
      
    • export interface iType{
    • id: number,
    • name: string,
    • }
    • export function findData (data: iType[], selectedData: number): iType {
    • // You Can Code Here
    • id: number,
    • name: string,
    • }
    • }
    • const datas: iType[] = [
    • {
    • id: 1,
    • name: "Manny"
    • },
    • {
    • id: 2,
    • name: "Danny"
    • },
    • {
    • id: 3,
    • name: "Socciella"
    • },
    • ];
    • export function findData ( data: iType[],selectedData: number): iType | undefined {
    • return data.find(item => item.id === selectedData);
    • }
    • findData(datas,1);
    • findData(datas,2);