Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134029 鄢晨曦 08有几个闰年 C++ Compile Error 0 MS 0 KB 283 2025-10-25 14:31:25

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d=0; cin>>a>>b>>c; if(a%4==0&&a%100!=0||a%400==0){ d++ } if(a%4==0&&b%100!=0||b%400==0){ d++ } if(a%4==0&&c%100!=0||c%400==0){ d++ } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(a%4==0&&a%100!=0||a%400==0){
              ^
Main.cc:8:2: error: expected ';' before '}' token
  }
  ^
Main.cc:9:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0&&b%100!=0||b%400==0){
           ^
Main.cc:11:2: error: expected ';' before '}' token
  }
  ^
Main.cc:12:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0&&c%100!=0||c%400==0){
           ^
Main.cc:14:2: error: expected ';' before '}' token
  }
  ^