ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1132. Square Root

Why my program receives OLE ???
Posted by Rizvanov++ de xXx 26 Apr 2006 11:37
......
......
......
int t,a,n,x0,x1;

void main(){
#ifndef ONLINE_JUDGE
    *stdin=*fopen("1132.in","r");
#endif
    for(scanf("%d",&t);t>0;t--){
        scanf("%d%d",&a,&n);
        x0=square_root_mod(a,n);
        if(x0){
            x1=n-x0;
            if(x0<x1)printf("%d %d\n",x0,x1);
            else printf("%d %d\n",x1,x0);
        }else printf("No root\n");
    }
#ifndef ONLINE_JUDGE
    fclose(stdin);
#endif
}

Edited by author 27.04.2006 11:29

Edited by author 27.04.2006 11:29