tried many test cases but getting wa
my soln: http://www.codechef.com/viewsolution/3469354
problem link: http://www.codechef.com/problems/RRECIPE/
tried many test cases but getting wa
my soln: http://www.codechef.com/viewsolution/3469354
problem link: http://www.codechef.com/problems/RRECIPE/
ur getting WA because of integer overflow .take the modulus at each step (i.e r=(r * 26)%MOD) here is ur modified soln i just changed r=r * 26%MOD .got AC