Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

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

$
0
0

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(); }


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>