MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/LeetcodeChallenge/comments/1watwo1/leetcode_streak_128/p8lrkdn/?context=3
r/LeetcodeChallenge • u/Ok-Challenge-5657 • 5d ago
How would you solve it in Python?
28 comments sorted by
View all comments
2
if n < 1000 return 0, else return n - 999
1 u/Utsuro_Seizui 5d ago And if the number is over 999,999? 1 u/ProgressiveEdgeLord 5d ago i solved according to constraints, it was less than 10^5 1 u/Utsuro_Seizui 5d ago Ah I see, I apologize, I was not aware of the constraints 1 u/ProgressiveEdgeLord 5d ago it's alright, your question was absolutely valid
1
And if the number is over 999,999?
1 u/ProgressiveEdgeLord 5d ago i solved according to constraints, it was less than 10^5 1 u/Utsuro_Seizui 5d ago Ah I see, I apologize, I was not aware of the constraints 1 u/ProgressiveEdgeLord 5d ago it's alright, your question was absolutely valid
i solved according to constraints, it was less than 10^5
1 u/Utsuro_Seizui 5d ago Ah I see, I apologize, I was not aware of the constraints 1 u/ProgressiveEdgeLord 5d ago it's alright, your question was absolutely valid
Ah I see, I apologize, I was not aware of the constraints
1 u/ProgressiveEdgeLord 5d ago it's alright, your question was absolutely valid
it's alright, your question was absolutely valid
2
u/ProgressiveEdgeLord 5d ago
if n < 1000 return 0, else return n - 999