Skip to content

Conversation

@x-64
Copy link
Contributor

@x-64 x-64 commented Dec 15, 2025

Method bit_count() for int is only available in python newer than 3.10.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a Python version compatibility issue by replacing the bit_count() method (Python 3.10+) with a backward-compatible alternative that works with older Python versions.

  • Replaces int.bit_count() with bin(int).count('1') to count set bits
  • Ensures the challenge code runs on Python versions older than 3.10
  • Maintains functional equivalence while improving compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant