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 7379bd4

Browse files
fix: update cpp solutions to lc problem: No.3153 (doocs#3462)
1 parent ca46b52 commit 7379bd4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎solution/3100-3199/3153.Sum of Digit Differences of All Pairs/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public:
143143
nums[i] /= 10;
144144
}
145145
for (int i = 0; i < 10; ++i) {
146-
ans += 1LL * (cnt[i] * (n - cnt[i]));
146+
ans += 1LL * cnt[i] * (n - cnt[i]);
147147
}
148148
}
149149
return ans / 2;

‎solution/3100-3199/3153.Sum of Digit Differences of All Pairs/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public:
141141
nums[i] /= 10;
142142
}
143143
for (int i = 0; i < 10; ++i) {
144-
ans += 1LL * (cnt[i] * (n - cnt[i]));
144+
ans += 1LL * cnt[i] * (n - cnt[i]);
145145
}
146146
}
147147
return ans / 2;

‎solution/3100-3199/3153.Sum of Digit Differences of All Pairs/Solution.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class Solution {
1212
nums[i] /= 10;
1313
}
1414
for (int i = 0; i < 10; ++i) {
15-
ans += 1LL * (cnt[i] * (n - cnt[i]));
15+
ans += 1LL * cnt[i] * (n - cnt[i]);
1616
}
1717
}
1818
return ans / 2;
1919
}
20-
};
20+
};

0 commit comments

Comments
(0)

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