Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:74: error: operands to '?:' have different types 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char'
    5 |     std::cin>>t;for(int i=1;i<=t;i++){std::cin>>p[i];std::cout<<(p[i]>20)?std::to_string(p[i]):(p[i]>10)?'L':'R';}
      |                                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P3009 手机电量显示202512GESP1级T2
语言
C++
递交时间
2026-01-10 16:07:37
评测时间
2026-01-10 16:07:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes