Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I wonder what status id : 4 means #441

Open
r01ex opened this issue Oct 25, 2023 · 0 comments
Open

I wonder what status id : 4 means #441

r01ex opened this issue Oct 25, 2023 · 0 comments

Comments

@r01ex
Copy link

r01ex commented Oct 25, 2023

[Request 2023. 10. 25. 오후 4:57:51] POST http://localhost:2358/submissions?wait=true
{
"source_code": "#include <stdio.h>\n#include <time.h>\n#include <unistd.h>\nint main()\n{\n struct timespec res;\n long nano1,nano2;\n\n /* read consecutive nanosecond values */\n clock_gettime(CLOCK_REALTIME,&res);\n nano1 = res.tv_nsec;\n sleep(5);\n clock_gettime(CLOCK_REALTIME,&res);\n nano2 = res.tv_nsec;\n printf("Difference: %lu\n",nano2-nano1);\n\n return(0);\n}",
"language_id": "50",
"number_of_runs": null,
"stdin": "Judge0",
"expected_output": "",
"cpu_time_limit": null,
"cpu_extra_time": null,
"wall_time_limit": null,
"memory_limit": null,
"stack_limit": null,
"max_processes_and_or_threads": null,
"enable_per_process_and_thread_time_limit": null,
"enable_per_process_and_thread_memory_limit": null,
"max_file_size": null,
"enable_network": null
}
[Response 2023. 10. 25. 오후 4:57:57] 201 Created
{
"stdout": "Difference: 530361\n",
"time": "0.004",
"memory": 924,
"stderr": null,
"token": "87459364-1451-438d-ad1d-05c6d6fc7999",
"compile_output": null,
"message": null,
"status": {
"id": 4,
"description": "Wrong Answer"
}
}
Above is the full request and response from dummy html
The running code is following
#include <stdio.h>
#include <time.h>
#include <unistd.h>
int main()
{
struct timespec res;
long nano1,nano2;

/* read consecutive nanosecond values */
clock_gettime(CLOCK_REALTIME,&res);
nano1 = res.tv_nsec;
sleep(5);
clock_gettime(CLOCK_REALTIME,&res);
nano2 = res.tv_nsec;
printf("Difference: %lu\n",nano2-nano1);

return(0);

}
Why isn't runtime larger than 5 seconds and what does status id 4 wrong answer means

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant