Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 361f0a0

Browse files
committed
Added README.md file for Convert Integer to the Sum of Two No-Zero Integers
1 parent d44d74c commit 361f0a0

File tree

1 file changed

+37
-0
lines changed
  • 1440-convert-integer-to-the-sum-of-two-no-zero-integers

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<h2><a href="https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers">Convert Integer to the Sum of Two No-Zero Integers</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p><strong>No-Zero integer</strong> is a positive integer that <strong>does not contain any <code>0</code></strong> in its decimal representation.</p>
2+
3+
<p>Given an integer <code>n</code>, return <em>a list of two integers</em> <code>[a, b]</code> <em>where</em>:</p>
4+
5+
<ul>
6+
<li><code>a</code> and <code>b</code> are <strong>No-Zero integers</strong>.</li>
7+
<li><code>a + b = n</code></li>
8+
</ul>
9+
10+
<p>The test cases are generated so that there is at least one valid solution. If there are many valid solutions, you can return any of them.</p>
11+
12+
<p>&nbsp;</p>
13+
<p><strong class="example">Example 1:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> n = 2
17+
<strong>Output:</strong> [1,1]
18+
<strong>Explanation:</strong> Let a = 1 and b = 1.
19+
Both a and b are no-zero integers, and a + b = 2 = n.
20+
</pre>
21+
22+
<p><strong class="example">Example 2:</strong></p>
23+
24+
<pre>
25+
<strong>Input:</strong> n = 11
26+
<strong>Output:</strong> [2,9]
27+
<strong>Explanation:</strong> Let a = 2 and b = 9.
28+
Both a and b are no-zero integers, and a + b = 11 = n.
29+
Note that there are other valid answers as [8, 3] that can be accepted.
30+
</pre>
31+
32+
<p>&nbsp;</p>
33+
<p><strong>Constraints:</strong></p>
34+
35+
<ul>
36+
<li><code>2 &lt;= n &lt;= 10<sup>4</sup></code></li>
37+
</ul>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /