|
|
back to boardShow all messages Hide all messagesI got wrong answer beacuse of test 6 Someone please explain what is test 6 Program in C #include <stdio.h> #include <math.h> int main() { long int n,m,y; int x,cont=0,aux1; scanf("%d %d %d",&n,&m,&y); for (int i = 0; i <=m-1 ; ++i) { aux1=pow(i,n); if (aux1%m == y) { printf("%d ",i); cont++; } } if (cont == 0) { printf("-1\n"); } return 0; } Edited by author 13.10.2020 05:27 |
|
|