Witam. Nie wiem dlaczego sędzia nie akceptuje mojego kodu. U mnie działa poprawnie. Prosze o pomoc. Pozdrawiam.
Example:
Wejście:
3
pierwszy
lubiec
ktotozrobi
Output:
pier
lub
ktoto
///////KOD//////
include <iostream
include <conio.h
include <cstdlib
include <string
using namespace std;
int main()
{
int t;
cin>>t;
string x;
int l;
for(int i=0; i<t; i++)
{
cin>>x;
l=x.length()/2;
cout<<x.substr(0, l)<<endl;
}
return 0;
}
created
last reply
- 15
replies
- 2.2k
views
- 11
users
- 6
links