Life, Universe and everything

#include
using namespace std;

int main() {
// your code goes here
bool flag = true;
while(flag)
{
int n;
scanf("%d",&n);
if(n != 42)
printf("%d",n);
else
flag = false;
}
return 0;
}

Can anyone help me understand why I’m getting TLE sigcount errors … :frowning_face:

2 mistakes

#include<bits/stdc++.h>

printf("%d\n",n);

sry
I’m getting sigcount error
#include
#include<bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
bool flag = true;
while(flag)
{
int n;
scanf("%d",&n);
if(n != 42)
printf("%d\n",n);
else
flag = false;
}
return 0;
}

#include is not an error
it is somehow not being pasted here

CodeChef: Practical coding for everyone see this

Runtime error
SIGCONT :frowning_face:

You are getting sigcont because you are not providing custom input

ohh okay
tnqq soo much
I’m new here didn’t know :slight_smile:

1 Like

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

3 Likes

I don’t think so it is giving that error it is perfectly fine.

tnqq
I’m new here will do it from next time
got the help for this one :slight_smile:

1 Like