JUNONGF TLE/WA

could ne1 please point out why m i getting TLE for this solution: IQGYPO - Online Python Interpreter & Debugging Tool - Ideone.com

and a WA for this solution: TZZjpd - Online Python Interpreter & Debugging Tool - Ideone.com

1 Like

I don’t know about TLE but I can probably give you reasons for WA

  1. You don’t need to define a power function. pow() is a builtin function in Python.
  2. You should check if any of the l[i] is 1. If that is the case, the answer is 1 in any case.
  3. You are not taking modulus of v before passing it to the power function.

You can refer to my submission here

Kindly post your question on the editorial page of the respective problem here: JUNONGF - Editorial - editorial - CodeChef Discuss. You will get your answer to your query.