Why i am getting WA in chefcode problem for 70 pts (java)? ( i was Expecting TLE or Ac)

i am solving CHEFCODE problem from May Challenge 2017
i am solving it using brute force by generating all possible subsequence and checking which subsequence product is smaller than k for 30pts, (for 100 pts, i know i have to use meet in middle technique) which i will implement later

Issue:-
alt text
i got 30 pts, and i was hoping tle for remaining 70 points but guess what, i got WA answer in some of the testCase along with TLE(no issue with this, i was expecting tle) in one case in 70 marks…

plz someONe help me to find out what Is wrong, which is causing WA… I tried my best to overCome WA

my solution link in java

Try the Log trick or Big Integer, I sense overflow here.

its all right on overFlow

i was counting duplicates sequences as same,but we have to treat them diffrently and count them seperatly… (littile bit ambiguious to think why)but alright…
as example:-
2 250
5 5
actual answer is :- {5,5,(5,5)} ==3

Oh! I get it. Good job finding the bug dear! :slight_smile: