Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

ISM01- what's wrong with my submission?

$
0
0
    import sys
def calc(t):
      q=0;
      while(t>0):
            q=q+int(t%10);
            t=t//10
      print(q,file=sys.stdout)
n=list();
s=int(input());
for i in range(s):
    n.append(int(input()));
for p in n:
 m=1;      
 for i in range(p+1):
       if(i==0):
              pass;
       else:
              m=m*i;
 calc(m);

After few debugging s i found this to be perfect. But still it s showing as an error..


Viewing all articles
Browse latest Browse all 39796

Trending Articles



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