|
|
back to boardI think my solution is right but they don't accept it , help? #include <stdio.h> int main(){ int a,b,c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if (a>b){ if (b>c){ printf("%d",c-(a*b)); } else{ printf("%d",b-(a*c)); } } if(b>a){ if (a<c){ printf("%d",a-(c*b)); } } return 0; } Re: I think my solution is right but they don't accept it , help? 1) a,b,c sequence is already sorted. 2) Try "1 1 1" input. Answer is -1. |
|
|