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.5.tar.gz (3.5 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.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tcmaker-0.0.5.tar.gz
  • Upload date:
  • Size: 3.5 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.5.tar.gz
Algorithm Hash digest
SHA256 ba902a207e10ba05fa112b51ebd0c3a66c7b3741eff88840fb1554d3b1c5d3de
MD5 b92acaf59da1797ca1349219f35fc28d
BLAKE2b-256 873a91e66726337d5e5fc4d3ac8c2a675545193324ff5511a0ebd50deb19eb08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tcmaker-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 34bc66cf1af183d8ea98f0e48aa8a3fa630b42d7e27a6aed2c1e8be5e3d987a8
MD5 7858ce88d2dd7137fa2f79c6451a8f15
BLAKE2b-256 92df64935df6ee0d78460fe59c60a74ccaf2252bd6022f93a6e5ba95f87f843d

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