“”“Python programming”""

```
def calc(p):
q=0;
while(p>0):
q+=(p%10);
p=int(p/10);
print(q)
m=1;
n=list();
s=int(input("Enter the number of test cases:"));
for i in range(s):
n.append(int(input("Enter your no.")));
for p in n:
for i in range(p+1):
if(i==0):
pass;
else:
m=m*i;
calc(m);
```