if(n!=2 || n>26)
{
printf(“y\n”);
}
else
{
printf(“n\n”);
Hi @tech_boy please can you explain why you give the above condition
thankx
if(n!=2 || n>26)
{
printf(“y\n”);
}
else
{
printf(“n\n”);
Hi @tech_boy please can you explain why you give the above condition
thankx
Just a quick illustration: if you want to make 26 different slices you would go from 1, 2 … 25 which equals 325 and the last slice would be 35. You could also try 27, but 1, 2, … 26 equals 351 - and the last slice would have to be 9 (repeating itself). So 26 is the limit.
The Ac solution gives y y y for n == 1 but for n = 1 that is for no cuts, we can’t get either equal or unequal piece. Will someone explains what I am missing.