1556. Thousand Separator Easy

@problem@discussion
#String



1/**
2 * [1556] Thousand Separator
3 *
4 * Given an integer n, add a dot (".") as the thousands separator and return it in string format.
5 *  
6 * Example 1:
7 * 
8 * Input: n = 987
9 * Output: "987"
10 * 
11 * Example 2:
12 * 
13 * Input: n = 1234
14 * Output: "1.234"
15 * 
16 *  
17 * Constraints:
18 * 
19 * 	0 <= n <= 2^31 - 1
20 * 
21 */
22pub struct Solution {}
23
24// problem: https://leetcode.com/problems/thousand-separator/
25// discuss: https://leetcode.com/problems/thousand-separator/discuss/?currentPage=1&orderBy=most_votes&query=
26
27// submission codes start here
28
29impl Solution {
30    pub fn thousand_separator(n: i32) -> String {
31        String::new()
32    }
33}
34
35// submission codes end
36
37#[cfg(test)]
38mod tests {
39    use super::*;
40
41    #[test]
42    fn test_1556() {
43    }
44}
45


Back
© 2025 bowen.ge All Rights Reserved.