Given two integers a and b. Now, c can be found as a + b = c. The task is to check if the equation is still valid after removing all zeroes from a, b and c. If valid then print Yes else print No.
Input: a = 101, b = 102
Current equation is 101 + 102 = 203
After removing 0s, 11 + 12 = 23 (which is still correct)
Input: a = 105, b = 106
105 + 106 = 211
15 + 16 = 211 (Incorrect)
- Calculate c.
- Remove all 0s from a, b and c.
- Check if the new values form a correct equation.
Below is the implementation of the above approach:
- Check whether a + b = c or not after removing all zeroes from a,b and c
- Check if the given chessboard is valid or not
- Program to check if a date is valid or not
- Check whether triangle is valid or not if sides are given
- Python | Check whether a string is valid json or not
- How to check if a string is a valid keyword in Python?
- Python | Check if string is a valid identifier
- Check if email address valid or not in Python
- Python | Shift zeroes at end of list
- Move all zeroes to end of array using List Comprehension in Python
- Removing punctuations from a given string
- Python | Pandas Series.valid()
- Python | Removing strings from tuple
- Python | Removing first element of list
- Python | Removing duplicates from tuple
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.