ATM (HS08TEST) | CodeChef Practice(Beginner) | CodeChef | Complete Solutions | ATM Problem CodeChef
Problem link :
https://www.codechef.com/problems/HS0...
All Problems link:
https://www.codechef.com/problems/sch...
Telegram link
https://t.me/programmerszonea
Hi, thanks for watching our video about basic conditionals in C++
In this video we’ll walk you through:
Problem statement
solved the problem live
Solution
ABOUT OUR CHANNEL
Our channel is all about Programming. We cover lots of cool stuff such as solution to problems, concept explanation and tricks to master CP
Check out our channel here:
/ @programmerszone
Don’t forget to subscribe!
CHECK OUT OUR OTHER Playlists
GeeksforGeeks playlist:
• GeeksforGeeks problems
Complete C++ Course playlist:
• Complete C++ playlist
CodeChef Playlist:
• CodeChef Problems
LeetCode problems
• Leetcode problems Solution
HackerRank playlist:
• HackeRank problems
FIND US AT
https://www.waadanibhao.wordpress.com
GET IN TOUCH
Contact us on [email protected]
Pooja would like to withdraw X $US from an ATM. The cash machine will only accept the transaction if X is a multiple of 5, and Pooja's account balance has enough cash to perform the withdrawal transaction (including bank charges). For each successful withdrawal the bank charges 0.50 $US. Calculate Pooja's account balance after an attempted transaction.
Input
Positive integer 0 less X less than equal to 2000 - the amount of cash which Pooja wishes to withdraw.
Nonnegative number 0 less than equal to Y less than equal to 2000 with two digits of precision - Pooja's initial account balance.
Output
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.
Example - Successful Transaction
Input:
30 120.00
Output:
89.50
Example - Incorrect Withdrawal Amount (not multiple of 5)
Input:
42 120.00
Output:
120.00
Example - Insufficient Funds
Input:
300 120.00
Output:
120.00
Author: u_admin_codechef_pw
Editorial: https://discuss.codechef.com/problems...
Tags: Tags are hidden. Show temporarily
Update this setting in edit profile
Date Added: 1-12-2008
Time Limit: 0.2 secs
Source Limit: 50000 Bytes
Languages: CPP14, C, JAVA, PYTH 3.6, CPP17, PYTH, PYP3, CS2, ADA, PYPY, TEXT, PAS fpc, NODEJS, RUBY, PHP, GO, HASK, TCL, PERL, SCALA, LUA, kotlin, BASH, JS, LISP sbcl, rust, PAS gpc, BF, CLOJ, R, D, CAML, FORT, ASM, swift, FS, WSPC, LISP clisp, SQL, SCM guile, PERL6, ERL, CLPS, ICK, NICE, PRLG, ICON, COB, SCM chicken, PIKE, SCM qobi, ST, SQLQ, NEM
Submit
My SubmissionsAll Submissions
Successful Submissions
Информация по комментариям в разработке