Created
February 1, 2015 05:29
-
-
Save shohan4556/3b10d59ed8a21bad0f7e to your computer and use it in GitHub Desktop.
URI -- 1555 (Functions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Author : Md.Shohanur Rahaman | |
| /// URI -- 1555 (Functions) | |
| #include<stdio.h> | |
| #include<math.h> | |
| int main() | |
| { | |
| int long long x,y,rafa,beto,carl,test,i; | |
| while(scanf("%lld",&test)==1){ | |
| for(i=1;i<=test;i++){ | |
| scanf("%lld %lld",&x,&y); | |
| rafa=pow((3*x),2)+pow(y,2); | |
| beto=2*pow(x,2)+pow((5*y),2); | |
| carl=-100*x+(pow(y,3)); | |
| if(rafa>beto && rafa>carl) | |
| printf("Rafael ganhou\n"); | |
| else if(beto>rafa && beto>carl) | |
| printf("Beto ganhou\n"); | |
| else | |
| printf("Carlos ganhou\n"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment