×

# Ceil and A-B problem

 0 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... asked 15 Oct '14, 23:32 3★rdfan19 24●2 accept rate: 25% 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 (16 Oct '14, 22:38) rdfan193★

 0 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? answered 16 Oct '14, 08:46 2.0k●2●14●32 accept rate: 20%
 0 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 answered 25 Jan '15, 11:54 1●1●5 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×690
×239
×10
×7
×6

question asked: 15 Oct '14, 23:32

question was seen: 921 times

last updated: 25 Jan '15, 11:54