Explore tweets tagged as #AddDigits
Excited to kick off the #75daysofleetcode challenge! 🎉 It's #day1 and today I solved the #AddDigits and #ReverseInteger problems in C++. Looking forward to leveling up my #DSA skills through this journey! 💻 #LeetCode #Challenge #100DaysOfCode #CodingJourney #BeginnerToPro
0
0
3
Day 2 of #100DaysOfCode! Explored Concepts: Python basics, subscripting, type checking, strings, num manipulation, f-strings. 🚀 Mini-projects: AddDigits, BMI Calculator, LifeInWeeks, TipCalculator Join me in this coding adventure - https://t.co/CxTpuoGmsu
1
0
0
📅 Day 217 – LeetCode #258 🧮 Add digits until one remains 🔁 Used recursion, then optimized to O(1) 💡 Digital root = 1 + (num - 1) % 9 🔥 Math tricks rock! #Java #LeetCode #AddDigits #MathTrick #DigitalRoot #300DaysOfCode #ProblemSolving
0
0
2
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. int addDigits(int sum) { while(sum > 9){ int n {0}; while(sum != 0){ n += sum % 10; sum /= 10; } sum = n; } return sum; }
0
1
13
def addDigits(x): if x == 0: return 0 res = x % 9 if res == 0: return 9 return res
1
0
0
DL: https://t.co/GzIsKrP7A4 Create a second program named Lab6A2 that will read an unknown number of integers from a text file and add up the digits in each number. o Write a function named addDigits that will accept a string version of a number and will do the ...
0
0
0
else: res = 0 for a in str(num): res = res + int(a) Проводим суммирование по разрядам числа, которое я скопипастила из функции summ. Осталось последнее: запустить цепочку рекурсии и вызвать функцию от себя самой. return self.addDigits(res)
1
0
0
🔗 GFG Sheet: https://t.co/7XyDoEdl6w 🔗 LC Sheet: https://t.co/59ODX9eTab 🔗 Second Largest: https://t.co/8akP6mA4p8 | Sol: https://t.co/PDteiJRDfI 🔗 Move Zeros: https://t.co/QO18wBHtSX | Sol: https://t.co/26DXkJhsW8 🔗 Add Digits: https://t.co/3rrK7JlRpb | Sol: https://t.co/TqMpuvWnR7
0
0
1
Splitting a number and then adding the digits using division https://t.co/lu0Md6MlAx public int addDigits(int num) { if( num <= 9 ) retu…
0
0
0
9th Day of #gitmas Today I learnt an algorithm to add digits that user enters (which is a string). Here is the link https://t.co/RnHOGr4Tz9
#RICodePush, @careerdevs
0
0
2
#MWRFinancial Home of the #InstantPayRaise - click and see how an #InstantPayRaise change your life #ShiftYourIncome #AddDigits and #MakeWealthReal for you!! Click on the link and find out!!
0
1
1
#MWRFinancial - Home of the #InstantPayRaise where an #InstantPayRaise or #IPR can #ShiftYourIncome #AddDigits or #ChangeYourLife!! Click here to watch the videos!! Find out what an #InstantPayRaise #IPR can do for you!!
0
1
1
MWR Financial - Home of the Instant Pay Raise!! Stop scrolling and find how an #InstantPayRaise can change your life!! #ShiftYourIncome #AddDigits #MakeWealthReal Click here and watch the video which can change your life!!
0
1
1