Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def countSumOfTwoRepresentations3(n, l, r)
- result = 0
- i = 1
- while (i <= n - i)
- if (l <= i and n - i <= r)
- result = result + 1
- end
- i = i + 1
- end
- return result
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement