fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string do_wyswietlenia="";
  8. string zapasowy;
  9. int stop;
  10. cin>>zapasowy;
  11. do_wyswietlenia+=zapasowy+"\n";
  12. while(stop!=3)
  13. {
  14. BBB:
  15. stop=0;
  16. AAA:
  17. if(zapasowy!="42")
  18. {
  19. cin>>zapasowy;
  20. do_wyswietlenia+=zapasowy+"\n";
  21. if(zapasowy=="42")
  22. {
  23. stop++;
  24.  
  25. if(stop!=3)
  26. {
  27. cin>>zapasowy;
  28. do_wyswietlenia+=zapasowy+"\n";
  29. goto AAA;
  30. }
  31. }
  32. else
  33. goto BBB;
  34. }
  35.  
  36.  
  37.  
  38. if(stop!=3)
  39. {
  40. cin>>zapasowy;
  41. do_wyswietlenia+=zapasowy+"\n";
  42. }
  43.  
  44. }
  45. cout<<do_wyswietlenia;
  46.  
  47.  
  48.  
  49. return 0;
  50. }
  51.  
Time limit exceeded #stdin #stdout 5s 260992KB
stdin
Standard input is empty
stdout
Standard output is empty