We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00e0123 commit 72f7b82Copy full SHA for 72f7b82
add-digits.cpp
@@ -0,0 +1,6 @@
1
+class Solution {
2
+public:
3
+ int addDigits(int num) {
4
+ return 1 + (num - 1) % 9;
5
+ }
6
+};
0 commit comments