/ Vijos /

记录详情

Wrong Answer

foo.cc: In function ‘int main()’:
foo.cc:7:43: warning: format ‘%c’ expects argument of type ‘char*’, but argument 11 has type ‘int’ [-Wformat=]
    7 |     scanf("%1d-%1d%1d%1d-%1d%1d%1d%1d%1d-%c\n",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],b);
      |                                          ~^                                                          ~
      |                                           |                                                          |
      |                                           char*                                                      int
foo.cc:7:10: warning: ‘b’ is used uninitialized [-Wuninitialized]
    7 |     scanf("%1d-%1d%1d%1d-%1d%1d%1d%1d%1d-%c\n",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],b);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:6:19: note: ‘b’ was declared here
    6 |     int a[9];char b;
      |                   ^
foo.cc:17:15: warning: array subscript 9 is above array bounds of ‘int [9]’ [-Warray-bounds=]
   17 |         if(a[9]-'0'==ans)cout<<"Right";
      |            ~~~^
foo.cc:6:9: note: while referencing ‘a’
    6 |     int a[9];char b;
      |         ^
# 状态 耗时 内存占用
#1 Wrong Answer Read 0-670-82162-4, expect Right. 3ms 536.0 KiB
#2 Accepted 3ms 536.0 KiB
#3 Accepted 3ms 556.0 KiB
#4 Accepted 2ms 536.0 KiB
#5 Accepted 2ms 324.0 KiB
#6 Wrong Answer Read 6-670-82162-X, expect Right. 2ms 536.0 KiB
#7 Accepted 2ms 720.0 KiB
#8 Wrong Answer Read 7-115-13880-X, expect Right. 2ms 536.0 KiB
#9 Accepted 2ms 536.0 KiB
#10 Accepted 2ms 536.0 KiB

信息

递交者
类型
递交
题目
P1484 ISBN号码
语言
C++
递交时间
2024-07-02 21:59:27
评测时间
2024-07-02 21:59:27
评测机
分数
70
总耗时
28ms
峰值内存
720.0 KiB