Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

digit sum codechef

#Solution provided by Sloth Coders 
n = int(input())
for _ in range(n):
    num = input()
    sum = 0
    for i in num:
        sum += int(i)
    print(sum)
Source by slothcoders.blogspot.com #
 
PREVIOUS NEXT
Tagged: #digit #sum #codechef
ADD COMMENT
Topic
Name
1+6 =