Wrong Answer

foo.cc: In function 'int main()':
foo.cc:6:24: warning: for increment expression has no effect [-Wunused-value]
    6 |         for(int i;i<N;i+1)
      |                       ~^~
foo.cc:8:18: warning: statement has no effect [-Wunused-value]
    8 |                 a+i;
      |                 ~^~
foo.cc:6:20: warning: 'i' is used uninitialized [-Wuninitialized]
    6 |         for(int i;i<N;i+1)
      |                   ~^~
foo.cc:6:17: note: 'i' was declared here
    6 |         for(int i;i<N;i+1)
      |                 ^
foo.cc:6:20: warning: 'N' is used uninitialized [-Wuninitialized]
    6 |         for(int i;i<N;i+1)
      |                   ~^~
foo.cc:5:13: note: 'N' was declared here
    5 |         int N,a;
      |             ^
foo.cc:10:15: warning: 'a' is used uninitialized [-Wuninitialized]
   10 |         cout<<a;
      |               ^
foo.cc:5:15: note: 'a' was declared here
    5 |         int N,a;
      |               ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 0, expect 66. 4ms 412.0 KiB
#2 Wrong Answer Read 0, expect 231. 4ms 284.0 KiB

信息

递交者
类型
递交
题目
P1030 1~N求和
语言
C++
递交时间
2023-12-19 19:55:04
评测时间
2023-12-19 19:55:04
评测机
分数
0
总耗时
9ms
峰值内存
412.0 KiB