count = 0
for i in range(100, 1000):
if str(i)[0] == str(i)[1] or str(i)[1] == str(i)[2] or str(i)[0] == str(i)[2]:
count += 1
print(count)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
count = 0
for i in range(100, 1000):
if str(i)[0] == str(i)[1] or str(i)[1] == str(i)[2] or str(i)[0] == str(i)[2]:
count += 1
print(count)