You are not logged in. Please login at www.codechef.com to post your questions!

×

Getting "Wrong answer" while submitting the code.

What is the problem in my code? I am getting wrong answer while submitting the code.

my problem: http://www.codechef.com/problems/HS08TEST/ my solution: http://www.codechef.com/viewsolution/4563027

asked 15 Aug '14, 02:08

arvindlearner's gravatar image

0★arvindlearner
11
accept rate: 0%


Hi arvindlearner, the problem statement says:

Output the account balance after the attempted transaction, given as a number with two digits of precision. If there is not enough money in the account to complete the transaction, output the current bank balance.

So check for example the input

5 5.1

Your program returns -0.4, which should not be possible.

link

answered 15 Aug '14, 02:48

gdisastery1's gravatar image

4★gdisastery1
1.9k41317
accept rate: 11%

edited 15 Aug '14, 02:48

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • 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:

×2,648
×1,466
×829
×533
×191

question asked: 15 Aug '14, 02:08

question was seen: 768 times

last updated: 15 Aug '14, 02:48