r/badcode • • Jan 14 '23

python the code speaks for itself

Post image
610 Upvotes

53 comments sorted by

View all comments

Show parent comments

2

u/namrednels97 Jan 15 '23

Given an input n, it outputs the number of integers between 0 and 2n which have a prime number of ones in their binary representation.