here is the code which shows the time limit exceeded! #include
using namespace std;
int main() { int n = 0; int input; while (n<1) { cin>>input;
if (input==42) { while(n<1) { cin>>input; } } else { cout<<input; } } return 0;
}
These two loops would do it, as n is always 0, you’ve got infinite loops.