Skip to content

Instantly share code, notes, and snippets.

@mrcat323
Created December 14, 2017 17:30
Show Gist options
  • Save mrcat323/00a52f8fd13aa8b9c0ed62af0a5df788 to your computer and use it in GitHub Desktop.
Save mrcat323/00a52f8fd13aa8b9c0ed62af0a5df788 to your computer and use it in GitHub Desktop.
Sums of digits
#!/usr/bin/env python3
# Function of sums of digits
def solve(a,b,c):
d=a*b+c
result=list(map(int,str(d))
return sum(result)
# The result will be "2"
print(solve(10,10,10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment