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
- Check whether triangle is valid or not if sides are given
- Program to check if a date is valid or not
- How to check if a string is a valid keyword in Python?
- Check if email address valid or not in Python
- Python | Check if string is a valid identifier
- Python | Check whether a string is valid json or not
- Python | Shift zeroes at end of list
- Move all zeroes to end of array using List Comprehension in Python
- Python - Kth Valid String
- Python | Pandas Series.valid()
- Python | Valid Ranges Product
- Program to generate all possible valid IP addresses from given string
- Removing punctuations from a given string
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.