|
|
back to boardWA 10 wht am i missing here? #include<stdio.h> int main() { int th,co,n1,n2,z; long s; scanf("%d %d %d %d",&th,&co,&n1,&n2); if(n2>n1) { z=n2-n1; s=2*z*co+((z-1)*th); } else { z=n1-n2; s=((2*z)+1)*co+(z+1)*th-1; } printf("%ld\n",s); return 0; } Re: WA 10 Please tell me why WA5 Re: WA 10 Posted by Egor 21 Apr 2012 00:35 10 1 4 3 |
|
|