MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / addDigits

Method addDigits

src/main/java/L0258_AddDigits.java:31–36  ·  view source on GitHub ↗

数学方法:使用数根的概念 数根是将一个数的各个位上的数字相加,得到的数再继续各位相加,直到得到一个一位数为止 对于一个非负整数 n,它的数根 dr(n) 满足: dr(n) = 0,如果 n = 0 dr(n) = 9,如果 n ≠ 0 且 n mod 9 = 0 dr(n) = n mod 9,如果 n mod 9 ≠ 0

(int num)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected