Skip to main content
Commonmark migration
Source Link

#05AB1E, 8 bytes

05AB1E, 8 bytes

Code:

µN¹åNp*½

Explanation:

µ          # Run this until the counting variable has reached the input value.
 N¹å       # Check if the input number is in the range variable.
    Np     # Check if the range variable is prime.
      *    # Multiply those two numbers (which is basically an AND operator).
       ½   # If true, increment the counting variable.
           # After the loop, the stack is empty and implicitly prints N.

Uses CP-1252 encoding. Try it online!.

#05AB1E, 8 bytes

Code:

µN¹åNp*½

Explanation:

µ          # Run this until the counting variable has reached the input value.
 N¹å       # Check if the input number is in the range variable.
    Np     # Check if the range variable is prime.
      *    # Multiply those two numbers (which is basically an AND operator).
       ½   # If true, increment the counting variable.
           # After the loop, the stack is empty and implicitly prints N.

Uses CP-1252 encoding. Try it online!.

05AB1E, 8 bytes

Code:

µN¹åNp*½

Explanation:

µ          # Run this until the counting variable has reached the input value.
 N¹å       # Check if the input number is in the range variable.
    Np     # Check if the range variable is prime.
      *    # Multiply those two numbers (which is basically an AND operator).
       ½   # If true, increment the counting variable.
           # After the loop, the stack is empty and implicitly prints N.

Uses CP-1252 encoding. Try it online!.

added 449 characters in body
Source Link
Adnan
  • 44.5k
  • 6
  • 82
  • 246

#05AB1E, 8 bytes

Code:

µN¹åNp*½

Explanation:

µ          # Run this until the counting variable has reached the input value.
 N¹å       # Check if the input number is in the range variable.
    Np     # Check if the range variable is prime.
      *    # Multiply those two numbers (which is basically an AND operator).
       ½   # If true, increment the counting variable.
           # After the loop, the stack is empty and implicitly prints N.

Uses CP-1252 encoding. Try it online!.

#05AB1E, 8 bytes

Code:

µN¹åNp*½

Uses CP-1252 encoding. Try it online!.

#05AB1E, 8 bytes

Code:

µN¹åNp*½

Explanation:

µ          # Run this until the counting variable has reached the input value.
 N¹å       # Check if the input number is in the range variable.
    Np     # Check if the range variable is prime.
      *    # Multiply those two numbers (which is basically an AND operator).
       ½   # If true, increment the counting variable.
           # After the loop, the stack is empty and implicitly prints N.

Uses CP-1252 encoding. Try it online!.

Source Link
Adnan
  • 44.5k
  • 6
  • 82
  • 246

#05AB1E, 8 bytes

Code:

µN¹åNp*½

Uses CP-1252 encoding. Try it online!.