IP-address
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In order to access the Internet, each computer is assigned a so-called IP-address. It consists of four integers in the range from 0 to 255 separated by dots. The next three lines show three valid IP-address:
127.0.0.0
192.168.0.01
255.00.255.255
Write a program that determines whether a given string is a valid IP-address.
Input
The input to the program served a string no longer than 15 characters, which includes figures and exactly three points.
Output
If the string is a valid IP-address, you must withdraw 1, 0 otherwise.
Examples
Input #1
Answer #1
Submissions 9K
Acceptance rate 28%