Wrong Answer

foo.cc: In function 'int main()':
foo.cc:11:20: warning: format '%F' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
   11 |         printf("%.2F",m);
      |                 ~~~^  ~
      |                    |  |
      |                    |  int
      |                    double
      |                 %.2d
foo.cc:7:18: warning: 'n' is used uninitialized [-Wuninitialized]
    7 |         while(a+1==n)
      |               ~~~^~~
foo.cc:5:17: note: 'n' was declared here
    5 |         int a,m,n;
      |                 ^
foo.cc:11:15: warning: 'm' may be used uninitialized [-Wmaybe-uninitialized]
   11 |         printf("%.2F",m);
      |         ~~~~~~^~~~~~~~~~
foo.cc:5:15: note: 'm' was declared here
    5 |         int a,m,n;
      |               ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 0.00, expect 66. 5ms 412.0 KiB
#2 Wrong Answer Read 0.00, expect 231. 5ms 516.0 KiB

信息

递交者
类型
递交
题目
P1030 1~N求和
语言
C++
递交时间
2023-12-22 21:38:18
评测时间
2023-12-22 21:38:18
评测机
分数
0
总耗时
10ms
峰值内存
516.0 KiB