题解 1116: IP判断

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

IP判断(JAVA语言)

摘要:具体代码如下:import java.util.Scanner; public class ContestUsing {     public static void main(String[……

简单易懂啊铁汁们

摘要:解题思路:看到输入输出,首先就想到用一个列表来存放每一行判断后的结果,最后再输出注意事项:注意在处理输入的时候,a.b.a.c这样的是不能转换为整数的,需要直接排除,这里我用try...except做……

1116: IP判断(C++代码)

摘要:#include <iostream> #include <string> using namespace std; //判断ip是否合法  bool isLegal(string i……

两种方法(C++)

摘要:解题思路:注意事项:参考代码:1.#include<iostream> #include <algorithm> #include <string> using namespace std;……

题解 1116: IP判断

摘要:解题思路:巧用scanf函数的返回值来实现循环注意事项:取反是当返回值为-1的时候取反为1,循环结束参考代码:#include<stdio.h>int main(){ int a,b,c,d,k; c……

IP判断

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int a,b,c,d;    int k;    char s[10……

c语言巧妙解答

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    char a[40];    int i,n;    while(~s……

编写题解 1116: IP判断

摘要:解题思路:把.作为分隔,分别判断字符串是不是属于0-255注意事项:参考代码:while True:    try:        n = input()        ls=[]        if……