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 55%
+37
SXW172P_thdgit
Kasper
CorentinTh
garamnyang
Salutations45
dmarkenstein
dreimert
LeoMartinDev
CGjupoulton
500error
#2
26 c.
Top 58%
Thomas
val
CatsAreFluffy
#3
27 c.
Top 63%
Yewzir
olivernybo
randolchance
AlephSquirrel
#4
28 c.
Top 66%
L
cers
aymeric-agre
#5
31 c.
Top 67%
Seboran
#6
32 c.
Top 70%
Logicer
jonny713
#7
33 c.
Top 71%
coldcoffeee
#8
34 c.
Top 78%
josex2r
chalda-pnuzig
Guillaume
team
Europe2048
TooBusyForYou
#9
35 c.
Top 81%
emma
Pascal
Chimerion86
#10
36 c.
Top 84%
thaispalmer
darcyclarke
#11
37 c.
Top 85%
Ryan
#12
38 c.
Top 87%
goodwyna21
ComputerKWasTaken
#13
39 c.
Top 91%
chester
NotAMojangDev
cabz0r
#14
41 c.
Top 92%
Mif712
#15
42 c.
Top 93%
moherik
#16
45 c.
Top 95%
tdopierala
Vincent
#17
47 c.
Top 98%
tidoni
yoyozbi
#18
49 c.
Top 99%
Scott
#19
287 c.
Top 100%
Sidd5arth