|
|
вернуться в форумI have wa#5 andI can't understand my mystake: Послано h1ci 3 дек 2008 21:07 #include <iostream> #include <string> using namespace std; int main() { int n=1999; string s; int pl[100000], br=0, j=0, symb; while(getline(cin,s,'ç')) { for(int i=0; i<s.size(); i++) { if(s[i]=='\n'){ s.erase(i,1);} } symb=0; for(;;) { if(s.size()==1) { if(s[0]=='?'){ cout << "Yes" << endl; return 0;} else if(s[0]==' ') { cout << "No" << endl; return 0;} else { cout << "No comments" << endl; return 0;} } symb=symb+(n-1); symb=symb%s.size(); s.erase(symb,1); } } return 0; } Edited by author 07.03.2009 01:46 Edited by author 07.03.2009 01:46 |
|
|