DSA
Medium
+15 XP
Sum of digits (Py)
Write solve(n) returning the sum of the digits of non-negative n.
Sign in to solve this challenge
Use your college email to start solving, earn XP, build a streak, and climb your college leaderboard. It is free.
Sign in with Google