输入后输出正确,提交至OJ上显示Wrong Answer

img

img

下面是我写的代码

#include <stdio.h>
#define N 100
void find_two_largest(const int a[],int n,int *largest,int *second_largest);
int main()
{
    int a[N],len;
    int largest,second_largest;
    scanf("%d",&len);
    for(int i=0;i<len;i++)
    {
        scanf("%d",&a[i]);
    }
    find_two_largest(a,len,&largest,&second_largest);
    printf("%d %d\n",largest,second_largest);
    return 0;
}
void find_two_largest(const int a[],int n,int *largest,int *second_largest)
{
    int i=0,b;
    int B[100]={};
    while(i<n)
    {
        B[i]=a[i];
        i++;
    }
    i=0;
    while(i<n)
    {
        if(a[i]<=a[i+1])  ;
        else
        {
            b=B[i];
            B[i]=B[i+1];
            B[i+1]=b;
        }
        i++;
    }
    i=0;
    while(i<(n-1))
    {
        if(B[i]<=B[i+1])  ;
        else
        {
            b=B[i];
            B[i]=B[i+1];
            B[i+1]=b;
        }
        i++;
    }
    *largest=B[n-1];
    *second_largest=B[n-2];
}

只提交那个find_two_largest函数即可