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 54%
+53
Benio
DigiZoli
500error
youbastard
madeforlosers
MaelkMark
dreimert
Rusty
fuzzylojik-golf
maximec-indy
#2
26 c.
Top 59%
val
Thomas
CatsAreFluffy
targrik
Ryan
#3
27 c.
Top 63%
AlephSquirrel
Yewzir
randolchance
olivernybo
SantYalSAuDATiOX
#4
28 c.
Top 66%
cers
L
aymeric-agre
#5
31 c.
Top 67%
shawnmcla
Seboran
#6
32 c.
Top 69%
Logicer
jonny713
#7
33 c.
Top 70%
coldcoffeee
#8
34 c.
Top 77%
Europe2048
team
josex2r
TooBusyForYou
Guillaume
CaporalDead
chalda-pnuzig
vaibhavbshete
#9
35 c.
Top 79%
emma
Pascal
Chimerion86
#10
36 c.
Top 81%
darcyclarke
thaispalmer
#11
37 c.
Top 82%
Ninluc
#12
38 c.
Top 84%
goodwyna21
ComputerKWasTaken
Lucas5825343024
#13
39 c.
Top 87%
chester
cabz0r
NotAMojangDev
#14
40 c.
Top 88%
denitsapavlova13
#15
41 c.
Top 89%
Mif712
#16
42 c.
Top 90%
moherik
#17
44 c.
Top 91%
m-i-z-u-k-i
#18
45 c.
Top 92%
tdopierala
Vincent
#19
47 c.
Top 95%
tidoni
Michael5736614216
yoyozbi
#20
49 c.
Top 96%
Scott
#21
63 c.
Top 97%
Haiko
#22
75 c.
Top 97%
c
#23
85 c.
Top 98%
ALefrancois27
#24
160 c.
Top 99%
Luke
#25
287 c.
Top 100%
Sidd5arth