Account Balance
Coding Problem Keys
Account Balance
Problem Statement
The initial balance B in a bank account is passed as the input. The amount entered by the customer in N ATM withdrawal attempts is also passed as the input. The program must print the final amount remaining in the bank account. (Assume no other transaction will happen in the bank account in the mean time).
Note: Withdrawal amount is always a multiple of 100.
Boundary Condition(s)
Input Format
Output Format
Example Input/Output 1
Input
Output
Explanation
Example Input/Output 2
Input
Output
Note: Max Execution Time Limit: 500 millisecs
Solution
Programming Language: Python 3 Language
b=int(input()) n=int(input()) l=list(map(int,input().split())) for i in l: if b-i<0: break else: b-=i print(b)
# Published By PKJCODERS
(Note: Incase If the code doesn't Pass the output kindly comment us with your feedback to help us improvise.)
Comments