Remove leading zeros from an IP address-test
Submissions: 9   Accuracy:

55.56%

  Max. Score:

20

Given an IP address, remove leading zeros from the IP address.

Input:
The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows, a single line of the input containing an IP address N.

Output:
Print the IP address with leading zeros removed.

Constraints:
1<=T<=100

Example:

Input:

2
100.020.003.400
001.200.001.004

Ouput:

100.20.3.400
1.200.1.4

Explanation:

For testcase 1: The IP address 100.020.003.400 becomes 100.20.3.400 by removing the leading zeroes.


to report an issue on this page.