Help with PERMUT2 - WA

Hello,
Am getting a WA for the below solution :

https://www.codechef.com/viewsolution/30753764

I know there is some redundant code there, but still not able to understand where the WA could be coming from.
Any help is appreciated :slight_smile:

https://www.codechef.com/viewsolution/30754185

dont use break inside if condition, may be testcases are not done
for n == 1: your code can print twice

1 Like

Ohh okay, got it thanks!