虚拟评测
开发中
POST
/judge/submit
请求参数
Header 参数
Authorization
string
可选
默认值:
Bearer 131Fa67D3C52f8d27BbDb777eC23dE3Bb68A24109Fb4c46Cd78471fAa3f9d529
Body 参数application/json
source_code
string
必需
language
string
必需
stdin
string
必需
expected_output
string
必需
示例
{
"source_code": "#include <stdio.h>\n\nint main(void) {\n char name[10];\n scanf(\"%s\", name);\n printf(\"hello, %s\\n\", name);\n return 0;\n}",
"language": "C",
"stdin": "world",
"expected_output": "hello, world\n"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/judge/submit?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"source_code": "#include <stdio.h>\n\nint main(void) {\n char name[10];\n scanf(\"%s\", name);\n printf(\"hello, %s\\n\", name);\n return 0;\n}",
"language": "C",
"stdin": "world",
"expected_output":"hello, world\n"
}'
返回响应
🟢200OK
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
title
string
必需
description
string
必需
input
string
必需
output
string
必需
sample_input
string
必需
sample_output
string
必需
hint
string
必需
tags
array[string]
必需
示例
{
"code": 0,
"msg": "string",
"data": {
"title": "string",
"description": "string",
"input": "string",
"output": "string",
"sample_input": "string",
"sample_output": "string",
"hint": "string",
"tags": [
"string"
]
}
}
修改于 2025-01-07 08:30:54