为什么代码放到编译器上编译通过,到oj网站上显示编译错误

//判断闰年的代码我写的
#include
 int main()
 {
     int t;
     scanf("%d\n", &t);
     
     while (t--)
     {
         int n;
         scanf("%d\n", &n);
         
         if ((n % 4 == 0 && n % 100 != 0) || n%400==0)
             
         {
             printf("YES\n");
         }

         else
         {
             printf("NO\n");
         }
     }
 }
//判断闰年的代码答案
#include 
int main() {
    int t;
    scanf("%d", &t);
    while (t--) {
        int n;
        scanf("%d", &n);
        if ((n % 4 == 0 && n % 100 != 0) || n % 400 == 0) {
            puts("Yes");
        }
        else {
            puts("No");
        }
    }
}
//要求
单点时限 1 秒
内存限制 128 MB

emmm,你的YES和NO和答案要求的Yes和No不一样啊

编译啥错误?还是答案错误?
输出要按照标准答案来,别自己随意大小写,换行符

输入那不要\n,你在去试试

while 循环里面的scanf,不要加 \n,去掉试试看

img


这个是要求 的输入输出,改了但还是不行