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

Common Board

1409 Two Gangester
Posted by Saud 10 Nov 2011 19:30
#include<iostream>
using namespace std;
int main()
{
int h,l;
cin>>h;
cin>>l;
if(h>=0 && h<=10 && l>=0 && l<=10)
{
cout<<10-h<<" "<<10-l<<endl;
}
return 0;
}

Sir kindly tell me why my this problem generete wrong outut at Test#2.  ????
1409 Two Gangester
Posted by Saud 11 Nov 2011 18:03
Can anyone help me???
If Yes plz give me answer.
I will be very thankful to him/her.
Re: 1409 Two Gangester
Posted by morbidel 11 Nov 2011 18:06
Your code is wrong. Printing 10-h and 10-l is correct only for the sample input. You should think at a more general formula.
1409 Two Gangester
Posted by Saud 12 Nov 2011 01:57
Sir kindly give me two or three more sample input cases.
can you give me?
Re: 1409 Two Gangester
Posted by morbidel 12 Nov 2011 02:25
Read the problem carefully and also problem's forum page: http://acm.timus.ru/forum/?space=1&num=1409