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 1409. Two Gangsters

Ruzmamat
Posted by Ruzmamat 21 Mar 2012 02:05
Friendoship!!!
Re: Ruzmamat
Posted by Amina 26 May 2012 01:39
What is wrong????

#include <math.h>
#include <stdio.h>


int main(){
     int larry, herry,sum;
scanf ("%i %i", &larry, &herry);
sum=larry+herry;

if (sum==11){
printf ("%i %i", herry-1, larry-1);
}
else
    printf ("wrong");
return 0;
}
Re: Ruzmamat
Posted by RainbowDash 15 Sep 2012 00:55
Because your output only supports the example given in the problem statement. If the sum is NOT 11, your program will fail. Eliminate the "if", and use your first printf.