Calculate Currency Change

Write Code

Problem Description

Your friend Rahul plans to visit exotic countries all around the world. Sadly, Rahul’s math skills aren’t good. He’s pretty worried about being scammed by currency exchanges during his trip – and he wants you to make a currency calculator for him. Here are his specifications for the app:

Given the amount of money before exchange and the amount of money that is taken from the budget to be exchanged, print the amount of money that is left from the budget.

 

Input Format

First line contains an integer N denoting the total budget, amount of money before exchange.

Second line contains an integer M denoting the exchanging amount, denoting the amount of money that is taken from the budget to be exchanged.

 

Output Format

Print a single line denoting the amount of money that is left from the budget.

 

Problem Constraints

1 <= N <= 1000

1 <= M <= N

 

Example Input

Input:-

116

12

 

Example Output

Output:-

104

Note: The problem constraints mean that when we test your code, the test cases used in the backend can have input values only within those constraints. You need not implement them in your code. You need to make sure your code will work for all such input values!

<code>

def main():
    # YOUR CODE GOES HERE
    # Please take input and print output to standard input/output (stdin/stdout)
    # E.g. ‘input()/raw_input()’ for input & ‘print’ for output
    n=int(input())
    m=int(input())
    print(n-m)

if __name__ == ‘__main__’:
    main()
</code>
Please signup/login to view answer.