Given a number N. The task is to complete the function convertFive() which replace all zeros in the number with 5 and returns the number.
The first line of input contains an integer T, denoting the number of testcases. Then T testcases follow. Each testcase contains a single integer N denoting the number.
The function will return integer where all zero's are converted to 5.
Since this is a functional problem you don't have to worry about input, you just have to complete the function convertFive().
1 <= T <= 103
1 <= N <= 104
Testcase 1: At index 1 and 2 there is 0 so we replace it with 5.
Testcase 2: There is no ,0 so output will remain same.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still
want to view the editorial?
Login to access your submissions.