M=int(input())
N=int(input())
a=0
v=0
for i in range(M,N+1):
a=str(i)
k=0
for b in range(len(a)):
if a[b]=='3':
k=k+1
if k==2:
v=v+1
print(v)
Ответ:
m = int(input())
n = int(input())
count = 0
for i in range(m, n+1):
a = []
while i > 0:
a.append(i%10)
i //= 10
if a.count(3) == 2:
count += 1
print(count)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
M=int(input())
N=int(input())
a=0
v=0
for i in range(M,N+1):
a=str(i)
k=0
for b in range(len(a)):
if a[b]=='3':
k=k+1
if k==2:
v=v+1
print(v)
Ответ:
m = int(input())
n = int(input())
count = 0
for i in range(m, n+1):
a = []
while i > 0:
a.append(i%10)
i //= 10
if a.count(3) == 2:
count += 1
print(count)