Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134002 罗晟睿 08判断是否为闰年 C++ Compile Error 0 MS 0 KB 203 2025-10-25 14:04:21

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int year; cin>>year; if(year%4==0 && year%100!=0||year%==0) { cout<<"yes"<<endl; } else{ cout<<"no"<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(year%4==0 && year%100!=0||year%==0) {
               ^
Main.cc:6:37: error: expected primary-expression before '=' token
  if(year%4==0 && year%100!=0||year%==0) {
                                     ^