In counter-strike, there are only 10 slots in a mix match consisting of only 2k10 players. I asked Akshit to give me the IP-Address, so that I could connect to the server.
But the fact being, I always knife akshit in any mix match we play together, he tried to be smart.
He gave me the IP-Address as "1902426" and told that his 'dot' key is not working.
Please help me figure out the possible IP-Addresses so that I can join the server ASAP.
Sort the addresses lexicographically, using their string ordering (the '.' character precedes all digit characters).
The numbers in each of the four positions can have any integer value between 0 and 255, inclusive. However, a number may not have leading zeroes.
For example, the digits 1902426 can form 22.214.171.124, 126.96.36.199, 188.8.131.52, and other IP addresses. However, it cannot form 19.02.4.26.
Input till EOF.
Each input will contain between 0 and 50 characters, inclusive.
Each character of IP will be between '0' and '9', inclusive.
For each input, print all the possible IPs followed by a new line.
Problem Setter : Sunny Lalwani