What kind of comment should I post on the problem page?

whr wrong answer?

4 Likes

How do I format a comment to include line breaks, for example? HTML is not allowed.

8 Likes

why wrong answer is giving even if i am getting expected outputs on every test cases

8 Likes

Queries regarding input-Output constraints or regarding unclear problem statements can be asked and are almost always answered by the admin.

1 Like

#include<stdio.h>

int function(int n)
{
if(n>1)
return (function(n-1)+factor(n-1));
if(n==1)
return 0;
}

int factor(int n)
{
int p=1,i,power=0;
for(i=2;ii<=n;i++)
{
power=0;
while(n%i==0)
{
n=n/i;
++power;
}
p=p
(power+1);
}
if(n>1)
{
p=p*2;
}
return p;
}

int main()
{
int t,n,i,a=0;
scanf("%d",&t);
while(t–)
{
scanf("%d",&n);
for(i=1;i<n;i++)
a=a+function(i*(n-i));
printf("%d\n",a);
a=0;
}

return 0;
}

4 Likes

Please notify if my comment/query is blocked from the contest page. At least I will not wait for the answer and post a more refined comment.

Or maybe the setter can post a comment with a modified form of query which is “acceptable”, along with the answer.

4 Likes

Please correct russian statements. On main page its written that objects indexes starts from 1, but russian statement claims that from 0.

http://www.codechef.com/viewsolution/4451849

Can we ask about the explanation of given test cases?

3 Likes

import java.util.Scanner;
class Puzzle
{
static int n,a[];
static int sum=0,statue,count,count1=0;
public static void main(String s[])
{
try
{
for(int j=0;j<50;j++)
{
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
if(n==0)
{
break;
}
count=0;
sum = 0;
count1++;
a=new int[n];
for(int i=0;i<n;i++)
{
a[i] = sc.nextInt();
sum = sum+a[i];
}
statue = sum/n;
for(int i=0; i<n;i++)
{
if(a[i]<=statue)
{
continue;
}
else
{
count=count + (a[i]-statue);
}
}
System.out.println(“Set #”+count1);
System.out.println(“The minimum number of moves is “+count+”.”);
}
}
catch(Exception e)
{
}
}
}

sir i not understood this point can please explain it

At the beginning Chef has segment [0, X] and no points on it. On each step Chef chooses the subsegment of maximal length possible such as it contains no points on it.

Is there something in specific that needs to be done to get my queries answered?
I have posted queries adhering to the above mentioned guidelines and still never get a response, can you explain a reason why this could be the case. Thanks in advance…!

#include <stdio.h>
#include <math.h>

int main()
{
int t;
scanf("%d", &t);

while(t--) 
{
	int a=0,b=0,c=0;
	scanf("%d %d",&a,&b);
	c=pow(a,b);
	printf("%d\n",c);
}
return 0;
WHAT ERROE IN IT

}

i don’t get it

#include<stdio.h>
#include<math.h>
int main()
{
int a[10];
int i,t,p;
scanf("%d",&t);
if(t<=0)
{
p=0;
printf("%d\n",p);
}
else{
while(t>0)
{
int min1,min2;
p=0;
for(i=0;i<=9;i++)
{
scanf("%d",(a+i));
}
min1=a[1];
min2=1;
for(i=1;i<=9;i++)
{
if(min1>a[i])
{
min2=i;
min1=a[i];
}
}
if(min1>a[0])
{
p=min2;
p=ppow(10,a[0]+1);
}
else
{
for(i=0;i<=min1;i++)
p=p+min2
pow(10,i);
}
printf("%d\n",p);
t–;
}
}
return 0;
}
check y this not true

I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for asking something which is not relevant?

I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for asking something which is not relevant?

Adobe Systems is hiring Software Engineers CTC:- 8-30 Lac, Exp:- 0-8 Years, Bangalore

Apply Here:- http://jobsiit.com/jobs/view/1876/Adobe-Systems/Software-Engineer

Check out the latest Coding jobs :- http://jobsiit.com/jobs/listing/Computer%20Science

package com.bhawna.CodeChef.easy;

import java.util.Scanner;

public class LuckyLong {

public static void main(String args[])
{
	int number,mod,count=0;
	Scanner scan=new Scanner(System.in);
	System.out.println("Enter the number of test cases");
	int testCases=scan.nextInt();
	while(testCases>0)
	{
		count=0;
		System.out.println("Enter a number");
		number=(scan.nextInt());
		while(number>0)
		{
			mod=number%10;
			if((mod%7==0||mod%4==0))
			{
				
			}
			else
			{
				count++;
			}
			number=number/10;
		}
		System.out.println(count);
		testCases--;
		
	}
}

}

#include<stdio.h>
#include<string.h>
main();
{
int n;
char c[2],k[2];
int i,t;
//printf(“enter the no of names”);
scanf("%d",&n);
for(t=0;t<n;t++)
{
scanf("%s",&c[t]);
scanf("%s",&k[t]);
}
strcmp (c[t],k[t]);
if (strcmp(c[t],k[t])==1)
{
printf("%s",k[t]);
}
for(t=0;t<n;t++)
{
i=atoi(c[t]);
printf(" %d",i);
}
return 0;
}