Automated grading of homework assignments and tests
- fork this repository
- solve the task
- commit with proper message
Return the number of odd numbers up to A.
Example 1:
Input: s = 12
Output: 6Example 2:
Input: s = 22
Output: 11Constraints:
- 1 <= length(s) <= 10^5
Return the number of even numbers up to "a".
Example 1:
Input: s = 15
Output: 8Example 2:
Input: s = 50
Output: 26Constraints:
- 1 <= length(s) <= 10^5
Return the sum of odd numbers up to "a".
Example 1:
Input: s = 15
Output: 64Constraints:
- 1 <= length(s) <= 10^5
Return the sum of even numbers up to "a".
Example 1:
Input: s = 20
Output: 110Constraints:
- 1 <= length(s) <= 10^5
Find the difference between the sum of odd numbers and the sum of even numbers up to a.
Example 1:
Input: s = 50
Output: -25Constraints:
- 1 <= length(s) <= 10^5
Return the larger of the odd and even numbers up to 'a', whichever is greater
Example 1:
Input: s = 10
Output: 30Constraints:
- 1 <= length(s) <= 10^5
Return odd and even numbers up to "a", whichever is smaller
Example 1:
Input: s = 10
Output: 25Constraints:
- 1 <= length(s) <= 10^5
return odd numbers as a string
Example 1:
Input: s = 10
Output: 13579Constraints:
- 1 <= length(s) <= 10^5
return even numbers as a string
Example 1:
Input: s = 10
Output: 0246810Constraints:
- 1 <= length(s) <= 10^5
If the number "a" is given, "tub son" is returned if it is a prime number, otherwise "tub son emas"
Example 1:
Input: s = 7
Output: "tub son"Example 2:
Input: s = 8
Output: "tub son emas"Constraints:
- 1 <= length(s) <= 10^5
- don't copy other solutions or any solution
- don't remove comments