leetcode-daily/cpp/2203/220303-CN.cpp

6 lines
159 B
C++

/**
* Refer: 220208.cpp
*
* 258. Add Digits
* Given an integer `num`, repeatedly add all its digits until the result has only one digit, and return it.
*/