# Advent of Code 2022  Day 1

**URL:** <https://forum.kx.com/t/advent-of-code-2022-day-1/12739>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [December 6, 2022, 8:35am UTC](https://forum.kx.com/t/advent-of-code-2022-day-1/12739 "2022-12-06T08:35:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SJT1](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@SJT1](https://forum.kx.com/u/SJT1)\
**Post date:** [December 6, 2022, 8:35am UTC](https://forum.kx.com/t/advent-of-code-2022-day-1/12739/1 "2022-12-06T08:35:00Z")

</div>

Eric Wastls annual Advent of Code competition draws some veteran q coders out of their hidey-holes each year. Their ingenious q solutions repay study, but are mostly shared in private forums. This years Day 1 AoC puzzle is not difficult, but it provoked solutions I would never have thought of myself.

Lucky you! Ive scraped together the solutions Ive seen and written them up in the Study Q repo, where you can also find the test and competition input files and solution scripts to play with. Just clone the repo, enjoy  and feel your q power growing.

https://github.com/qbists/studyq

Pull requests welcome, of course! (Ill do my best to keep up, but can see this lasting well after the holiday season.)

---

<div class="post-metadata">

**Author:** ![LeahS1](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@LeahS1](https://forum.kx.com/u/LeahS1)\
**Post date:** [December 8, 2022, 5:48pm UTC](https://forum.kx.com/t/advent-of-code-2022-day-1/12739/2 "2022-12-08T17:48:00Z")

</div>

Nice work @SJT, thanks very much for sharing!&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [December 17, 2022, 4:54am UTC](https://forum.kx.com/t/advent-of-code-2022-day-1/12739/3 "2022-12-17T04:54:00Z")

</div>

Here’s another method of solving aoc1:

(first;sum 3#desc@)@:sum each where[null 0N,r] \_ r:“J”$read0 `:aoc1.txt
