We simply need to find the maximum of numbers which are formed by multiplying the digit of interval [I;I+K] where I is from [0, N-K]. Maximum of K can be 7, and there are at most 100 test cases each with a maximum length of 10000 which means that a simple brute force is enough to get that green accepted message.
No comments:
Post a Comment