Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 77dde0f

Browse files
committed
"Number of Digit One": update comment
1 parent 5b327f4 commit 77dde0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/233.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int countDigitOne(int n) {
66
if (n >= 1 && n <= 9) return 1;
77

88
int x = n; /* first digit of n */
9-
int v = 1; /* round value of n that all digits are zero except first digit */
9+
int v = 1; /* first dight's weight */
1010
while (x >= 10) {
1111
x /= 10;
1212
v *= 10;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /