All Submissions


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 1.90.24.26, 19.0.24.26, 190.2.4.26, and other IP addresses. However, it cannot form 19.02.4.26.


Input
Input till EOF.
Each input will contain between 0 and 50 characters, inclusive.
Each character of IP will be between '0' and '9', inclusive.

Output
For each input, print all the possible IPs followed by a new line.

Sample Input
1902426
12345678912345
255255255255

Sample Output
1.90.24.26
1.90.242.6
19.0.24.26
19.0.242.6
190.2.4.26
190.2.42.6
190.24.2.6


255.255.255.255

Problem Setter : Sunny Lalwani

Languages: Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0