Runtime Error

foo.cc:35:24: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   35 |                 return '000000';
      |                        ^~~~~~~~
foo.cc:36:16: warning: multi-character character constant [-Wmultichar]
   36 |         return '000';
      |                ^~~~~
foo.cc: In function ‘std::string findnum(std::string)’:
foo.cc:8:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    8 |         for(int i=0;i<s.size();i++)
      |                     ~^~~~~~~~~
foo.cc: In function ‘char findjinlu(std::string)’:
foo.cc:20:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   20 |         for(int i=0;i<s.size();i++)
      |                     ~^~~~~~~~~
foo.cc:35:24: warning: overflow in conversion from ‘int’ to ‘char’ changes value from ‘808464432’ to ‘48’ [-Woverflow]
   35 |                 return '000000';
      |                        ^~~~~~~~
foo.cc:36:16: warning: overflow in conversion from ‘int’ to ‘char’ changes value from ‘3158064’ to ‘48’ [-Woverflow]
   36 |         return '000';
      |                ^~~~~
# 状态 耗时 内存占用
#1 Runtime Error Aborted 3ms 504.0 KiB
#2 Runtime Error Aborted 2ms 504.0 KiB
#3 Runtime Error Aborted 2ms 504.0 KiB
#4 Runtime Error Aborted 2ms 504.0 KiB

信息

递交者
类型
递交
题目
P2558 单位转换3级T2 2023.12
语言
C++
递交时间
2025-07-22 13:10:57
评测时间
2025-07-22 13:10:57
评测机
分数
0
总耗时
11ms
峰值内存
504.0 KiB