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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tcmaker-0.0.7.tar.gz
  • Upload date:
  • Size: 3.6 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.7.tar.gz
Algorithm Hash digest
SHA256 f240d0328bbb52647acb53cece6904db831190b339f600e5c8737e868788e455
MD5 0418de473d6343339f95ea9a689ae387
BLAKE2b-256 8e570d6e001a9e60d0f2252bbb3b3bb3e665710dfd1e523e7d27f4a3a0df5d42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tcmaker-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3961a7ce726c9d47124f088ca1d43cacfe03b4fe9eda25725592c7d193d8dee1
MD5 ca4f36af2252fbbfb61642afcbdd3282
BLAKE2b-256 0771d490a81a3db099d70177e2d17210a60b5a23a80384fed75836e99ece7150

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