Accepted

foo.cc:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    3 | main()
      | ^~~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/istream:41,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/sstream:40,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/complex:45,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/ccomplex:39,
                 from stdc++.h:127:
In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>]’,
    inlined from ‘int main()’ at foo.cc:14:32:
/nix/gcc-13.2.0/include/c++/13.2.0/ostream:223:25: warning: ‘b’ may be used uninitialized [-Wmaybe-uninitialized]
  223 |       { return _M_insert(__f); }
      |                ~~~~~~~~~^~~~~
foo.cc: In function ‘int main()’:
foo.cc:6:16: note: ‘b’ was declared here
    6 |         double b,sum=0;
      |                ^
# 状态 耗时 内存占用
#1 Accepted 2ms 556.0 KiB
#2 Accepted 2ms 536.0 KiB
#3 Accepted 2ms 536.0 KiB

信息

递交者
类型
递交
题目
P2351 1.5.1:求平均年龄
比赛
春季班初级4.13
语言
C++
递交时间
2024-04-13 13:29:39
评测时间
2024-04-13 13:29:39
评测机
分数
100
总耗时
7ms
峰值内存
556.0 KiB