fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int t;
  8. cin >> t;
  9. if (0<t && t<=100) while (t>0)
  10. {
  11. string wejscie;
  12. cin >> wejscie;
  13. if (0<wejscie.length() && wejscie.length()<=1000 && wejscie.length()%2==0)
  14. {
  15. int n;
  16. char tablica[n];
  17. for (int i=0;i<=(wejscie.length()-1)/2;i++)
  18. {
  19. tablica[i]=wejscie[i];
  20. cout << tablica[i];
  21. }
  22. t--;
  23. cout << endl;
  24. }
  25. else return 0;
  26. }
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 4448KB
stdin
2
dupa
alamakota
stdout
du