Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145093 姜景文 [在线测评解答教程] 闰年 C++ Compile Error 0 MS 0 KB 551 2026-01-25 08:29:52

Tests(0/0):


Code:

#include <stdio.h> int main() { int t, n; scanf("%d", &t); while (t--) { scanf("%d", &n); //在这里写判断 n 是否为闰年的代码及输出结果 } return 0; } return 0; }#include <stdio.h> int main() { int t, n; scanf("%d", &t); while (t--) { scanf("%d", &n); //在这里写判断 n 是否为闰年的代码及输出结果 } return 0; }scanf("%d", &n); //在这里写判断 n 是否为闰年的代码及输出结果 } return 0; }


Run Info:

Main.cc:12:2: error: stray '#' in program
 }#include 
  ^
Main.cc:11:4: error: expected unqualified-id before 'return'
 }  return 0;
    ^
Main.cc:12:1: error: expected declaration before '}' token
 }#include 
 ^
Main.cc: In function 'int main()':
Main.cc:5:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &t);
                    ^
Main.cc:7:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &n);
                        ^