-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhw6.py
More file actions
69 lines (57 loc) · 768 Bytes
/
hw6.py
File metadata and controls
69 lines (57 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
"""
1.B
"""
"""
2.
A = int(input())
B = int(input())
i = 0
mul = 1
while i < B:
mul *= A
i+=1
print(mul)
"""
"""
3.Sum of digit
T = int(input())
i = 0
l = []
while i < T:
N = int(input())
sum = 0
while N > 0 :
n = N % 10
sum = sum + n
N //= 10
l.append(sum)
i+=1
while j < T:
print(l[0])
j += 1
"""
"""
4.Table
A = int(input())
i = 1
while i <= 10:
print(f"{A} * {i} = {A*i}")
i+=1
"""
"""
5.Number of Digit
"""
T = int(input())
i = 0
l = []
while i < T:
N = int(input())
sum = 0
count = 0
while N > 0 :
N //= 10
count += 1
l.append(count)
i+=1
for x in l:
print(x)