Digi-sum

Sum all the digits of an integer.

Easy12/15/2023

Problem statement

Given a string representing an positive integer, return the sum of all the digits of that integer.

Problem leaderboard

#
Size
%
Users
#1
25 c.
Top 61%
+32
tree
fuzzylojik-golf
oskar
voytxt
lucas
mathis
alexisab
Benio
madeforlosers
Kacarott
#2
26 c.
Top 65%
Thomas
val
CatsAreFluffy
#3
27 c.
Top 71%
randolchance
olivernybo
Yewzir
AlephSquirrel
#4
28 c.
Top 75%
L
aymeric-agre
cers
#5
31 c.
Top 77%
Seboran
#6
32 c.
Top 78%
jonny713
#7
33 c.
Top 80%
coldcoffeee
#8
34 c.
Top 86%
team
Guillaume
TooBusyForYou
chalda-pnuzig
#9
35 c.
Top 90%
Pascal
emma
Chimerion86
#10
36 c.
Top 91%
darcyclarke
#11
37 c.
Top 93%
Ryan
#12
38 c.
Top 94%
ComputerKWasTaken
#13
39 c.
Top 97%
cabz0r
chester
#14
45 c.
Top 99%
tdopierala
#15
49 c.
Top 100%
Scott