sb-judger
  1. Code
sb-judger
  • Code
    • 判题
      POST
    • 运行代码
      POST
  1. Code

运行代码

POST
/v1/code/run

请求参数

Body 参数application/json

示例
{
    "lang": "c",
    "code": "string",
    "input": "string",
    "time": 0,
    "memory": 0,
    "outMsgLimit": 0
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://test-cn.your-api-server.com/v1/code/run' \
--header 'Content-Type: application/json' \
--data-raw '{
    "lang": "c",
    "code": "string",
    "input": "string",
    "time": 0,
    "memory": 0,
    "outMsgLimit": 0
}'

返回响应

🟢200A successful response.
application/json
Body

示例
{
    "outPut": "string",
    "cpuTimeUsage": 0,
    "realTimeUsage": 0,
    "memoryUsage": 0,
    "state": "CE"
}
🔴500An unexpected error response.
修改于 2023-12-04 12:32:17
上一页
判题
Built with