Quantcast
Viewing all articles
Browse latest Browse all 39796

ISM01- what's wrong with my submission?

"""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);

Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>