记录详情

Wrong Answer

foo.cc: In function 'int main()':
foo.cc:22:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(year%4==0&&month>=3||year%400==0&&month>=3)
     ~~~~~~~~~^~~~~~~~~~
foo.cc:24:12: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(month<3&&year%4!=0||year%400!=0)
     ~~~~~~~^~~~~~~~~~~
foo.cc: In function 'int ly(int)':
foo.cc:31:6: warning: unused variable 'day' [-Wunused-variable]
  int day;
      ^~~
foo.cc:32:6: warning: unused variable 'month' [-Wunused-variable]
  int month;
      ^~~~~
foo.cc:33:6: warning: 'year' is used uninitialized in this function [-Wuninitialized]
  int r4=year%4;
      ^~
foo.cc: In function 'int main()':
foo.cc:10:18: warning: 'leap' is used uninitialized in this function [-Wuninitialized]
  int leap=ly(leap); 
                  ^
foo.cc: In function 'int fj(int)':
foo.cc:55:7: warning: 'leap' may be used uninitialized in this function [-Wmaybe-uninitialized]
    day=27+leap;
    ~~~^~~~~~~~
foo.cc: In function 'int main()':
foo.cc:11:12: warning: 'month' is used uninitialized in this function [-Wuninitialized]
  int day=fj(month); 
          ~~^~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer Read {0}, expect {1}. ["2","1"] 2ms 404.0 KiB
#2 Accepted 2ms 404.0 KiB
#3 Accepted 2ms 412.0 KiB
#4 Accepted 2ms 384.0 KiB
#5 Accepted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
A1-4 分支结构练习:今年过去了多少天
比赛
2020苏青奥赛集训营(2021-1-31课堂小练)
语言
C++
递交时间
2021-01-31 21:56:08
评测时间
2021-01-31 21:56:08
评测机
分数
80
总耗时
12ms
峰值内存
412.0 KiB