解题思路:
注意事项:
参考代码:
while True:
s=input()
if s=='End of file':
break
a,b,c,d=s.split('.')
if a.isdigit() and b.isdigit() and c.isdigit() and d.isdigit():
if a[0]!='0' and b[0]!='0' and c[0]!='0' and d[0]!='0':
if 0<=int(a)<=255 and 0<=int(b)<=255 and 0<=int(c)<=255 and 0<=int(d)<=255:
print('Y')
else:
print('N')
else:
print('N')
else:
print('N')
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:642 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:744 |
打水问题 (C语言代码)浏览:1072 |
三角形 (C++代码)递归(存在大量重复计算,容易出现时间超限)浏览:781 |
C语言程序设计教程(第三版)课后习题11.1 (C语言代码)浏览:621 |
IP判断 (C语言代码)浏览:539 |
C语言训练-大、小写问题 (C语言代码)浏览:681 |
C语言程序设计教程(第三版)课后习题8.4 (C语言代码)浏览:573 |
C语言程序设计教程(第三版)课后习题8.6 (C语言代码)浏览:772 |
哥德巴赫曾猜测 (C语言代码)浏览:724 |