Skip to main content
-1 byte use substr_count instead
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

PHP, 4646 45 bytes

fn($a,$b)=>count_chars=>substr_count(join(range($a,$b)),1)[49]

Try it online!Try it online!

PHP, 46 bytes

fn($a,$b)=>count_chars(join(range($a,$b)))[49]

Try it online!

PHP, 46 45 bytes

fn($a,$b)=>substr_count(join(range($a,$b)),1)

Try it online!

Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

PHP, 46 bytes

fn($a,$b)=>count_chars(join(range($a,$b)))[49]

Try it online!