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)提供评测服务