Skip to main content

testcase maker for online judge

Project description

1. 설치 방법

pip install tcmaker

2. 데이터 형식 지정 예시

실행 폴더에 format.txt파일이 있어야 합니다. 이 파일에는 데이터의 형식을 지정합니다.

[Var]
n: 1~100
x: -1000~1000
m: 1~n
y: 0~1

[Format]
n m
drept(n,x,' ')
rept(m,y,'\n')

여기서 rept(반복횟수,변수명,구분자) 명령이 있습니다. drept명령은 사용법은 동일한데 데이터의 중복없이 반복하는 명령입니다. 값의 범위는 변수 정의에 따릅니다.

위 명령으로 생성되는 데이터의 예시

5 4
-12 123 2 -982
0
1
1
0

3. 실행 방법 예시

아래와 같은 파일을 만들어서 실행합니다.

import tcmaker

start_n = 1    # 데이터 시작 번호
end_n = 10     # 데이터 끝 번호

for i in range(start_n, end_n+1):
  format_file = 'format.txt'        # 데이터 형식 지정 파일명
  input_file = f'test{i:02d}.in'    # 만들 입력 파일명
  output_file = f'test{i:02d}.out'  # 만들 출력 파일명
  run_file = 'solve.py'             # 정답 코드 파일명
  terminal = 'PowerShell'           # 터미널 종류(PowerShell 또는 아무거나)

  tcm = tcmaker.tcmaker()
  tcm.generate(format_file, input_file, output_file, run_file, terminal)

4. 기타

아직 부족한 점이 많습니다. 변수명 정의 또는 rept명령에 변수와 수식 혼용 사용가능합니다. 차차 업데이트하도록 하겠습니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tcmaker-0.0.6.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tcmaker-0.0.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file tcmaker-0.0.6.tar.gz.

File metadata

  • Download URL: tcmaker-0.0.6.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for tcmaker-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8a75823f61542fb1f53021e433d7c6564a8f291da2cf3b1d7e73a4486a8d0260
MD5 798ae93f0ff1e894dcdd48ef16a83cca
BLAKE2b-256 015f50905d89d4ccd167df47874c6fb6a41aec29a6f2b3db385540c6c455ff16

See more details on using hashes here.

File details

Details for the file tcmaker-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: tcmaker-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for tcmaker-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 231a04d13c9aae2d72fde5a570454b38ee54eb05e8ddbbbfe370a762272883e2
MD5 1eb8840d43c07a0dca010a3ae3513c75
BLAKE2b-256 b9b199693cd9fc27fd9a2309db2f2c39eacd939a877d5dded0f8e0ba4b6566f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page