Wrong Answer

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:37: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
     for(int i = 0; i <= 2; i++)s[i] = getchar();
                                ~~~~~^~~~~~~~~~~
/in/foo.cc:5:22: note: within this loop
     for(int i = 0; i <= 2; i++)s[i] = getchar();
                    ~~^~~~
/in/foo.cc:6:5: warning: 's[2]' is used uninitialized in this function [-Wuninitialized]
     if(s[2] == '0'){
     ^~
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 368.0 KiB
#2 Wrong Answer 1ms 360.0 KiB
#3 Wrong Answer 1ms 376.0 KiB

信息

递交者
类型
自测
题目
P1696 反向输出一个三位数
语言
C++
递交时间
2024-06-25 18:25:48
评测时间
2024-06-25 18:25:48
评测机
分数
0
总耗时
5ms
峰值内存
376.0 KiB