Given a string of letters and numbers, only numbers are extracted from them and natural numbers are made in that order. It outputs the natural numbers created and the number of divisors of the natural numbers.
If you just extract a number from "t0e0a1c2h0er," it's 0, 0, 1, 2, 0 and if you make a natural number, it's 120. That is, the first digit 0 is ignored when making natural numbers. The output is 120, and then the next line is the number of divisors of 120.
The natural number produced by extraction does not exceed 100,000,000.
The first line is given a string mixed with numbers. The string cannot be longer than 50.
Output the natural numbers in the first line, and the number of divisors in the second line.
g0en2Ts8eSoft
28
6
a = input()
num = 0
cnt = 0
for i in a:
if i.isdigit():
num = num * 10 + int(i)
print (num)
for i in range (1, num + 1):
if num % i == 0:
cnt += 1
print (cnt)