After soving the problem Ciel and A-B Problem i checked the best submissions in C lang. and found that these submissions fail the basic test case which states that A-B should not be equal to A.

http://www.codechef.com/viewsolution/1844100

http://www.codechef.com/viewsolution/1943632

these are the code I am talking about.For i/p 6 1 o/p is 6.

still the solution is accepted?

I am confused…

Who told you that? Ciel gives a wrong answer. You have to just change one digit in the actual answer and print it out! So how does that, A-B ! =A come into picture? 6-1 =5 should be the actual answer, but you can change one digit and make it 6. So that makes 6 a valid output. Have you misunderstood the problem statement a bit?

hey pranjal …

i thot the same as u bt look above the example given …

it is saying 5858 - 1234 , cannot give 5858…!!!

the case of 5858 as answer has been rejected

Constraints

1 ≤ B < A ≤ 10000

Sample Input

5858 1234

Sample Output

1624

Output details

The correct answer of 5858-1234 is 4624.

So, for instance, 2624, 4324, 4623, 4604 and 4629 will be accepted, but 0624, 624, 5858, 4624 and 04624 will be rejected.

copied this from problem page,it says 5858 will be rejected which is the A