Skip to main content
deleted 25 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

Husk, 88 7 bytes

≤⁰▲foEpḊ≤⁰▲mΠgp 

Try it online!Try it online!

 p   # get the list of divisorsprime factors of arg2;   fo g # now filter them to include# onlygroup thoseequal thatones satisfy:together  p  # prime factors  E  # areand allmultiply thethem sametogether (soto it'sget athe prime power divisors); ▲  # get the maximum of whatever's left;these; ≤⁰  # is it ≤ arg1? 

Husk, 8 bytes

≤⁰▲foEpḊ 

Try it online!

  # get the list of divisors of arg2;   fo # now filter them to include only those that satisfy:  p  # prime factors  E  # are all the same (so it's a prime power); ▲ # get the maximum of whatever's left; ≤⁰ # is it ≤ arg1? 

Husk, 8 7 bytes

≤⁰▲mΠgp 

Try it online!

 p   # get the list of prime factors of arg2; g # group equal ones together  # and multiply them together (to get the prime power divisors); ▲  # get the maximum of these; ≤⁰  # is it ≤ arg1? 
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

Husk, 8 bytes

≤⁰▲foEpḊ 

Try it online!

 Ḋ # get the list of divisors of arg2; fo # now filter them to include only those that satisfy: p # prime factors E # are all the same (so it's a prime power); ▲ # get the maximum of whatever's left; ≤⁰ # is it ≤ arg1?