MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / getSum

Function getSum

CodeChef_problems/Chef and Card game/solution.py:20–25  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

18
19 # Function that finds the sum of integers of both c,m
20 def getSum(num):
21 s = 0
22 while num>0:
23 s += int(num%10)
24 num = int(num/10)
25 return s
26
27 # appending the sum of integers of c,m to the respective lists
28 a.append(getSum(c))

Callers 1

solution.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected