carloscn / carloscn/structstudy
leetcode1556:千位分隔数(thousand-separator)
Open
Lang-rust
Level-easy
一般问题
字符串
查找
- Dominant language
- C
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
给你一个整数 n,请你每隔三位添加点(即 "." 符号)作为千位分隔符,并将结果以字符串格式返回。
示例 1:
输入:n = 987
输出:"987"
示例 2:
输入:n = 1234
输出:"1.234"
示例 3:
输入:n = 123456789
输出:"123.456.789"
示例 4:
输入:n = 0
输出:"0"
提示:
0 <= n < 2^31
来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/thousand-separator
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.