i'm using c++4.9.9.2 how should i submit my solution??

while submitting there are no option of compiler similar to mine so my submissions does not compile and hence are giving compilation error.here’s one of my code:

#include<conio.h>
#include<stdio.h>
#include<math.h>
main()
{
long int sum=0,n,m,j,i,k,t;

  scanf("%d %d %d",&n,&m,&k);
  for(j=2;j<n;j++)
  {
                  int t=0;
                  for(i=2;i<n;i++)
                  {
                                  if(n%i==0 && j%i==0)
                                  t++;
                  }
                                  if(t==0)
                                  sum = sum + pow(j,m);
                  
  }
  sum=sum%k;
  printf("%d",1+sum);

getch();
}

This 4.9.9.2 seems to be your Dev C++ version.

On CodeChef you must not use conio.h and its functions.

You can have a look at this for the format of submitted solution

2 Likes

Go to the submit page and there will be a drop down menu for various languages.You can Choose either C++ 4.3.2 or 4.8.1 or C++ 11 from there and paste your code in the box or upload your file. Codechef uses the GCC compiler for running your code. You should not use conio but can use other headers like iostream, cstdio, vector, algorithm , etc

1 Like