|
|
back to boardWhy wrong(C++) (incorrect input)? Posted by Ilya 16 Jun 2019 18:07 #include <iostream> #include <string> using namespace std; int main() { int n,i,k=2; string s; cin>>n;
for (i=1;i<=n;++i) { getline(cin,s); if (s.find("+")!=string::npos) k+=2;
else ++k; }
if (k==13) ++k;
cout<<k*100;
return 0; } Edited by author 16.06.2019 18:08 Edited by author 16.06.2019 18:08 |
|
|