第一个测试点没过
查看原帖
第一个测试点没过
1549440
wbhzswl楼主2025/1/15 22:13
#include <stdio.h>
#include <string.h>


int main() {
    char str1[100];
    char str2[100];
    gets(str1);
    gets(str2);
    if (strstr(str1, str2) != NULL)
        {
        printf("%s is substring of %s", str2, str1);
    } 
    else if (strstr(str2, str1) != NULL) 
        {
        printf("%s is substring of %s", str1, str2);
    } 
    else 
        {
        printf("No substring");
    }
}
2025/1/15 22:13
加载中...