2022-03-27 20:56:26 +08:00
|
|
|
<p>Convert a non-negative integer <code>num</code> to its English words representation.</p>
|
|
|
|
|
|
|
|
<p> </p>
|
2023-12-09 18:42:21 +08:00
|
|
|
<p><strong class="example">Example 1:</strong></p>
|
2022-03-27 20:56:26 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
<strong>Input:</strong> num = 123
|
|
|
|
<strong>Output:</strong> "One Hundred Twenty Three"
|
|
|
|
</pre>
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
<p><strong class="example">Example 2:</strong></p>
|
2022-03-27 20:56:26 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
<strong>Input:</strong> num = 12345
|
|
|
|
<strong>Output:</strong> "Twelve Thousand Three Hundred Forty Five"
|
|
|
|
</pre>
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
<p><strong class="example">Example 3:</strong></p>
|
2022-03-27 20:56:26 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
<strong>Input:</strong> num = 1234567
|
|
|
|
<strong>Output:</strong> "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
<p><strong>Constraints:</strong></p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><code>0 <= num <= 2<sup>31</sup> - 1</code></li>
|
|
|
|
</ul>
|