Skip to content

Commit b77e6ad

Browse files
committed
Create README - LeetHub
1 parent d3e828b commit b77e6ad

File tree

1 file changed

+30
-0
lines changed
  • 2180-count-integers-with-even-digit-sum

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<h2><a href="https://leetcode.com/problems/count-integers-with-even-digit-sum">2180. Count Integers With Even Digit Sum</a></h2><h3>Easy</h3><hr><p>Given a positive integer <code>num</code>, return <em>the number of positive integers <strong>less than or equal to</strong></em> <code>num</code> <em>whose digit sums are <strong>even</strong></em>.</p>
2+
3+
<p>The <strong>digit sum</strong> of a positive integer is the sum of all its digits.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> num = 4
10+
<strong>Output:</strong> 2
11+
<strong>Explanation:</strong>
12+
The only integers less than or equal to 4 whose digit sums are even are 2 and 4.
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre>
18+
<strong>Input:</strong> num = 30
19+
<strong>Output:</strong> 14
20+
<strong>Explanation:</strong>
21+
The 14 integers less than or equal to 30 whose digit sums are even are
22+
2, 4, 6, 8, 11, 13, 15, 17, 19, 20, 22, 24, 26, and 28.
23+
</pre>
24+
25+
<p>&nbsp;</p>
26+
<p><strong>Constraints:</strong></p>
27+
28+
<ul>
29+
<li><code>1 &lt;= num &lt;= 1000</code></li>
30+
</ul>

0 commit comments

Comments
 (0)