Skip to main content
Commonmark migration
Source Link

#SmileBASIC, 49 bytes

SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

Uses the fact that D>N/D = D>sqrt(N) for positive numbers

#SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

Uses the fact that D>N/D = D>sqrt(N) for positive numbers

SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

Uses the fact that D>N/D = D>sqrt(N) for positive numbers

added 65 characters in body
Source Link
12Me21
  • 6.7k
  • 1
  • 22
  • 40

#SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

Uses the fact that D>N/D = D>sqrt(N) for positive numbers

#SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

#SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT

Uses the fact that D>N/D = D>sqrt(N) for positive numbers

Source Link
12Me21
  • 6.7k
  • 1
  • 22
  • 40

#SmileBASIC, 49 bytes

INPUT N
FOR D=1TO N/D
IF N MOD D<1THEN?D,N/D
NEXT