9 条题解

  • 0
    @ 2025-9-15 8:36:27

    #include <stdio.h> int main() {

    int n,i=1,t,c;
    char a[1001];
    scanf("%d",&n);
    scanf("%s",a);
    while(i<n)
    {
        t=0;
        while(t<=i)
        {   if(a[t]!=a[n-1-i+t])
            {c=0;i++;break;}
            else c=1;
            t++;}
        if(c==1)
        {printf("%d",t);break;}
    }
    return 0;
    

    }

    信息

    ID
    49
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    (无)
    递交数
    1777
    已通过
    423
    上传者