273. Integer to English Words Hard
1/**
2 * [273] Integer to English Words
3 *
4 * Convert a non-negative integer num to its English words representation.
5 *
6 * Example 1:
7 *
8 * Input: num = 123
9 * Output: "One Hundred Twenty Three"
10 *
11 * Example 2:
12 *
13 * Input: num = 12345
14 * Output: "Twelve Thousand Three Hundred Forty Five"
15 *
16 * Example 3:
17 *
18 * Input: num = 1234567
19 * Output: "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"
20 *
21 *
22 * Constraints:
23 *
24 * 0 <= num <= 2^31 - 1
25 *
26 */
27pub struct Solution {}
28
29// problem: https://leetcode.com/problems/integer-to-english-words/
30// discuss: https://leetcode.com/problems/integer-to-english-words/discuss/?currentPage=1&orderBy=most_votes&query=
31
32// submission codes start here
33
34impl Solution {
35 pub fn number_to_words(num: i32) -> String {
36 String::new()
37 }
38}
39
40// submission codes end
41
42#[cfg(test)]
43mod tests {
44 use super::*;
45
46 #[test]
47 fn test_273() {
48 }
49}
50
Back
© 2025 bowen.ge All Rights Reserved.