骑在牛背上看书

关注

【leetcode_easy_math】1523. Count Odd Numbers in an Interval Range

骑在牛背上看书

关注

阅读 95

2022-07-13

problem

​​1523. Count Odd Numbers in an Interval Range​​

solution#1: 分别计算0到low-1和0到high的奇数数目,然后做差即可。

code

 

solution#2:根绝high和low的奇偶性判断。

code

 

参考

1. ​​leetcode_easy_math_1523. Count Odd Numbers in an Interval Range​​;

完

相关推荐

code_balance

【leetcode_easy_math】1025. Divisor Game

code_balance 62 0 0

魔都魅影梅杜萨

【leetcode_easy_math】1175. Prime Arrangements

魔都魅影梅杜萨 73 0 0

中间件小哥

【leetcode_easy_math】1009. Complement of Base 10 Integer

中间件小哥 44 0 0

杨小羊_ba17

【leetcode_easy_math】1281. Subtract the Product and Sum of Digits of an Integer

杨小羊_ba17 63 0 0

无聊到学习

【leetcode_easy_math】883. Projection Area of 3D Shapes

无聊到学习 101 0 0

ITWYY

【leetcode_easy_math】1237. Find Positive Integer Solution for a Given Equation

ITWYY 60 0 0

人间四月天i

【leetcode_easy_math】1317. Convert Integer to the Sum of Two No-Zero Integers

人间四月天i 87 0 0

源码之路

[leetcode] 201. Bitwise AND of Numbers Range

源码之路 88 0 0

曾宝月

LeetCode //C - 327. Count of Range Sum

曾宝月 33 0 0

小黑Neo

LeetCode: 315. Count of Smaller Numbers After Self

小黑Neo 83 0 0

精彩评论(0)

0 0 举报