记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:5: error: unknown type name 'string'; did you mean 'stdin'?
    5 |     string s;cin>>s;
      |     ^~~~~~
      |     stdin
foo.c:5:14: error: 'cin' undeclared (first use in this function)
    5 |     string s;cin>>s;
      |              ^~~
foo.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
foo.c:6:14: error: request for member 'length' in something not a structure or union
    6 |     int n = s.length();
      |              ^
foo.c:9:13: error: request for member 'substr' in something not a structure or union
    9 |         if(s.substr(i,j).find('5') != string::npos) ans++;
      |             ^
foo.c:9:39: error: 'string' undeclared (first use in this function); did you mean 'stdin'?
    9 |         if(s.substr(i,j).find('5') != string::npos) ans++;
      |                                       ^~~~~~
      |                                       stdin
foo.c:9:45: error: expected ')' before ':' token
    9 |         if(s.substr(i,j).find('5') != string::npos) ans++;
      |           ~                                 ^
      |                                             )
foo.c:10:5: error: 'cout' undeclared (first use in this function)
   10 |     cout<<ans<<'\n';
      |     ^~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1290 C. Young Man Do Not Say Five
语言
C
递交时间
2022-08-13 11:11:14
评测时间
2022-08-13 11:11:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes