We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
What is the problem with this and in testcase 2 the input is 3 and 2 and the expected output is 5 which is logically impossible. The ans must be 3 and my code is also giving ans as 3.
include
include
int main()
{
int n,p,i,j,mul,count=0;
scanf("%d %d",&n,&p);
for(i=1;i
P-sequences
You are viewing a single comment's thread. Return to all comments →
What is the problem with this and in testcase 2 the input is 3 and 2 and the expected output is 5 which is logically impossible. The ans must be 3 and my code is also giving ans as 3.
include
include
int main() { int n,p,i,j,mul,count=0; scanf("%d %d",&n,&p); for(i=1;i
}