Skip to main content
deleted 86 characters in body
Source Link
Joao-3
  • 1.4k
  • 4
  • 18

Vyxal, 18 16 13 1311 bytes

Thanks to The Thonnu for -57 bytes

£ƛ¥$%¬$æ∧;∑1=ƛ?$Ḋ$æ∧;∑1=

Run itRun it

Explanation:

£             # save to register
 ƛ       ;    # map over itthe input with this code:
  ¥ ?          # retrieve fromget registerinput
   $          # swap
    %         # modulo
     ¬        # logical notdivisible?
      $       # swap
       æ      # is the item prime?
        ∧     # logical and

          ∑   # sum
           1= # is 1?

Vyxal, 18 16 13 bytes

Thanks to The Thonnu for -5 bytes

£ƛ¥$%¬$æ∧;∑1=

Run it

Explanation:

£             # save to register
 ƛ       ;    # map over it with this code:
  ¥           # retrieve from register
   $          # swap
    %         # modulo
     ¬        # logical not
      $       # swap
       æ      # is the item prime?
        ∧     # logical and

          ∑   # sum
           1= # is 1?

Vyxal, 18 16 13 11 bytes

Thanks to The Thonnu for -7 bytes

ƛ?$Ḋ$æ∧;∑1=

Run it

Explanation:

ƛ      ;    # map over the input with this code:
 ?          # get input
  $         # swap
           # divisible?
    $       # swap
     æ      # is the item prime?
      ∧     # logical and

        ∑   # sum
         1= # is 1?
deleted 171 characters in body
Source Link
Joao-3
  • 1.4k
  • 4
  • 18

Vyxal, 18 16 1613 bytes

Thanks to The Thonnu for -25 bytes

:£ɾƛ:¥$%¬$æ∧;∑1=£ƛ¥$%¬$æ∧;∑1=

Run itRun it

Explanation:

:                # duplicate the input
 £               # save to register
  ɾ              # get the inclusive range starting from 1
   ƛ        ;    # map over it with this code:
    :            # duplicate the item
     ¥           # retrieve from register
      $          # swap
       %         # modulo
        ¬        # logical not
         $       # swap
          æ      # is the item prime?
           ∧     # logical and

             ∑   # sum
              1= # is 1?

Vyxal, 18 16 bytes

Thanks to The Thonnu for -2 bytes

:£ɾƛ:¥$%¬$æ∧;∑1=

Run it

Explanation:

:                # duplicate the input
 £               # save to register
  ɾ              # get the inclusive range starting from 1
   ƛ        ;    # map over it with this code:
    :            # duplicate the item
     ¥           # retrieve from register
      $          # swap
       %         # modulo
        ¬        # logical not
         $       # swap
          æ      # is the item prime?
           ∧     # logical and

             ∑   # sum
              1= # is 1

Vyxal, 18 16 13 bytes

Thanks to The Thonnu for -5 bytes

£ƛ¥$%¬$æ∧;∑1=

Run it

Explanation:

£             # save to register
 ƛ       ;    # map over it with this code:
  ¥           # retrieve from register
   $          # swap
    %         # modulo
     ¬        # logical not
      $       # swap
       æ      # is the item prime?
        ∧     # logical and

          ∑   # sum
           1= # is 1?
added 87 characters in body
Source Link
Joao-3
  • 1.4k
  • 4
  • 18

Vyxal, 1818 16 bytes

Thanks to The Thonnu for -2 bytes

:→xɾƛ£ɾƛ:←x$%¬$æ∧;∑1=¥$%¬$æ∧;∑1=

Run itRun it

Explanation:

:                  # duplicate the input
 →x £               # assign itsave to xregister
   ɾ               # get the inclusive range starting from 1
    ƛ         ;    # map over it with this code:
     :             # duplicate the item
      ←x¥           # retrieve x
 from register
      $          # swap
         %         # modulo
          ¬        # logical not
           $       # swap
            æ      # is the item prime?
             ∧     # logical and

               ∑   # sum
                1= # is 1

Vyxal, 18 bytes

:→xɾƛ:←x$%¬$æ∧;∑1=

Run it

Explanation:

:                  # duplicate the input
 →x                # assign it to x
   ɾ               # get the inclusive range starting from 1
    ƛ         ;    # map over it with this code:
     :             # duplicate the item
      ←x           # retrieve x
        $          # swap
         %         # modulo
          ¬        # logical not
           $       # swap
            æ      # is the item prime?
             ∧     # logical and

               ∑   # sum
                1= # is 1

Vyxal, 18 16 bytes

Thanks to The Thonnu for -2 bytes

:£ɾƛ:¥$%¬$æ∧;∑1=

Run it

Explanation:

:                # duplicate the input
 £               # save to register
  ɾ              # get the inclusive range starting from 1
   ƛ        ;    # map over it with this code:
    :            # duplicate the item
     ¥           # retrieve from register
      $          # swap
       %         # modulo
        ¬        # logical not
         $       # swap
          æ      # is the item prime?
           ∧     # logical and

             ∑   # sum
              1= # is 1
Source Link
Joao-3
  • 1.4k
  • 4
  • 18
Loading