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.4.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.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tcmaker-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 4f5dce6ad4688b3e063c9785b3a22ae1af6e7c7cc8e89eb8450ee9830b26a4f3
MD5 70909e45f60bc024eeeaf36c36458e7c
BLAKE2b-256 c08141193dedb193ef4fd60ccb7ee14225474887b1714ceb1deeaf55e70a8477

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tcmaker-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 973e6955c7dea732acc1b6831e8ce0fef744e51113cf3fb866af879edad12d77
MD5 0618c40e7088b1843974ae97a7332293
BLAKE2b-256 c5502e69b2446b0b1405c891ccaf3db5c77d35dbd61c906785f9dfc6c57861eb

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