Skip to content

Stropek/KattisPythonTemplate

Repository files navigation

Kattis Solution

Build Status

Python 3 scaffolding for solving Kattis problems.

Prep

Init

From Scripts directory, run

.\init.ps1 [POBLEM_NAME]

This should create a Python directory next to where you cloned the scaffolding repo, download sample test files for your problem and open VS Code instance ready for you to start working on your solution.

Solving

Solutions should go in Solution.py file.

Unit tests

For unit tests to work all output needs to be written to out

def solve(self, in_file_stream, out=sys.stdout):
  out.write('expected output')

Submitting

Be sure to uncomment this line:

Solution().solve(sys.stdin, sys.stdout)

Run submit.bat.

IDEs

Scaffolding is set to work with Visual Studio Code, but if you prefer to use PyCharm you can by commenting line 32 and uncommenting line 31 in projectSetup.ps1.

31. #Start-Process Pycharm $workingDir.ToString()
32. Start-Process code $workingDir.ToString() -NoNewWindow

About

template for solutions to problems on open.kattis.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published