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 56%
+50
sean
alexisab
tree
CorentinTh
fuzzylojik-golf
Rusty
DigiZoli
500error
CGjupoulton
Shanethegamer
#2
26 c.
Top 60%
targrik
Ryan
CatsAreFluffy
Thomas
val
#3
27 c.
Top 64%
Yewzir
randolchance
olivernybo
AlephSquirrel
#4
28 c.
Top 67%
L
cers
aymeric-agre
#5
31 c.
Top 69%
shawnmcla
Seboran
#6
32 c.
Top 70%
jonny713
Logicer
#7
33 c.
Top 71%
coldcoffeee
#8
34 c.
Top 79%
team
chalda-pnuzig
CaporalDead
Guillaume
TooBusyForYou
josex2r
Europe2048
vaibhavbshete
#9
35 c.
Top 81%
emma
Chimerion86
Pascal
#10
36 c.
Top 83%
darcyclarke
thaispalmer
#11
37 c.
Top 84%
Ninluc
#12
38 c.
Top 87%
Lucas5825343024
goodwyna21
ComputerKWasTaken
#13
39 c.
Top 90%
NotAMojangDev
cabz0r
chester
#14
40 c.
Top 91%
denitsapavlova13
#15
41 c.
Top 92%
Mif712
#16
42 c.
Top 93%
moherik
#17
45 c.
Top 94%
tdopierala
Vincent
#18
47 c.
Top 97%
tidoni
yoyozbi
Michael5736614216
#19
49 c.
Top 98%
Scott
#20
75 c.
Top 99%
c
#21
287 c.
Top 100%
Sidd5arth