Canonicalize CIDR: Difference between revisions

no edit summary
(→‎{{header|Python}}: trim whitespace)
No edit summary
Line 1:
{{task}}
 
Implement a function or program that, given a range of IPIPv4 addresses in CIDR notation (dotted-decimal/network-bits), will return/output the same range in canonical form,. thatThat is, withthe IP address noneportion of the hostoutput bitsCIDR block must not contain any set. (1) bits in the host part of the address.
 
Example: given 87.70.141.1/22, your code should output 87.70.140.0/22.
1,481

edits