/ OPS /

记录详情

Compile Error

/in/foo.cc: In function 'long long unsigned int fun(std::__cxx11::string)':
/in/foo.cc:6:35: error: expected ',' or ';' before 'sum'
  unsigned long long int a[100]={0}sum=0;
                                   ^
/in/foo.cc:7:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<str.length();i++){
               ^
/in/foo.cc:9:9: error: 'sum' was not declared in this scope
  a[i]=1;sum+=pow(2,str.length()-1-i);
         ^
/in/foo.cc:13:9: error: 'sum' was not declared in this scope
  return sum;
         ^

信息

递交者
类型
递交
题目
P1944 转十进制数
语言
C++
递交时间
2023-04-01 11:37:42
评测时间
2023-04-01 11:37:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes