python:
1 #!/usr/bin/python
2
3 sum1=0
4 for i in range(1,2048):
5 k=str(i)
6 sum1=sum1+k.count('1')
7 print(sum1)
python:
1 #!/usr/bin/python
2
3 sum1=0
4 for i in range(1,2048):
5 k=str(i)
6 sum1=sum1+k.count('1')
7 print(sum1)