跳转到主要内容

未提供项目描述

项目描述

PyPi

advent-of-code-python

使用Rust实现并在Python中使用PyO3暴露的Advent of Code解决方案。

作为库的使用

添加依赖项

pip install --upgrade advent-of-code

advent_of_code包导出单个solve函数,具有以下签名

def solve(year: int, day: int, part: int, input: str) -> str

示例

from advent_of_code import solve

assert solve(2019, 1, 1, "14") == "2"
assert solve(2019, 3, 2, "R8,U5,L5,D3\nU7,R6,D4,L4") == "30"

作为命令行工具的使用

$ pip install --upgrade advent-of-code
$ echo 14 | advent-of-code-py 2019 1 1
2

项目详情


版本历史 发布通知 | RSS源

下载文件

下载适用于您平台文件的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

此版本没有可用的源分发文件。请参阅有关生成分发存档的教程。

构建版本

advent_of_code-2022.0.66-cp39-abi3-win_amd64.whl (737.9 kB 查看哈希)

上传时间 CPython 3.9+ Windows x86-64

advent_of_code-2022.0.66-cp39-abi3-musllinux_1_1_x86_64.whl (867.3 kB 查看哈希)

上传时间 CPython 3.9+ musllinux: musl 1.1+ x86-64

advent_of_code-2022.0.66-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (834.5 kB 查看哈希)

上传时间 CPython 3.9+ manylinux: glibc 2.17+ x86-64

advent_of_code-2022.0.66-cp39-abi3-macosx_10_9_universal2.whl (1.5 MB 查看哈希)

上传时间 CPython 3.9+ macOS 10.9+ universal2 (ARM64, x86-64)

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面