Skip to content

Commit

Permalink
docs: 优化拆分整数的阅读体验
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Oct 24, 2024
1 parent f2a7731 commit bc2a2fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faq/exercise/split_digits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
拆分整数的各位数
************************************************************************************************************************

拆分整数的核心在于,
拆分整数的核心在于, 十进制的表示方式是 :math:`d_0 * 10^0 + d_1 * 10^1 + ... + d_n * 10^n`, 因此,

- 利用整数求余 :cpp:`%` 运算, 我们可以 "筛" 掉高位部分: :cpp:`2193 % 100 == 93`.
- 利用整数整除 :cpp:`/` 运算, 我们可以 "筛" 掉低位部分: :cpp:`2193 / 100 == 21`.
Expand Down

0 comments on commit bc2a2fa

Please sign in to comment.