IntermediateRating 1300
Longest Piece With Sum k
All numbers are positive. Print the length of the longest block of consecutive numbers with sum exactly k, or 0.
Input
n and k, then n positive integers.
Output
One integer.
Sample 1
Input
7 5 2 3 5 1 1 1 2
Output
4
Sample 2
Input
3 100 1 2 3
Output
0
Output appears here