I have submitted the code with the same logic, what bhaiya taught in the tutorial video of Prata.
here’s my code.
Please tell me what wrong I’m doing.
Prata- Spoj question explained by Prateek Bhaiya
This code is giving Time Limit Exceeded. Can you help as to why? and what insights I’m missing.
@adarsh_2001 hey this your updated code you are using two different variables for storing ans i.e one is the ans variable and the other one is the years variable.