# Solving Advent of Code Puzzles in Idiomatic Kotlin

DevFeed: [Solving Advent of Code Puzzles in Idiomatic Kotlin](<https://devfeed.tech/articles/solving-advent-of-code-puzzles-in-idiomatic-kotlin-22987.md>)

Original publisher: [Read original article](<https://dev.to/kotlin/solving-advent-of-code-puzzles-in-idiomatic-kotlin-1m62>)

Author: Svetlana Isakova

Published: 2021-07-15T12:41:37Z

Content type: tutorial

Language: en

Sources: [Kotlin](<https://devfeed.tech/sources/kotlin-2.md>)

Topics: [Advent of Code](<https://devfeed.tech/topics/advent-of-code.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [100daysofcode](<https://devfeed.tech/tags/100daysofcode.md>), [advent-of-code](<https://devfeed.tech/tags/advent-of-code.md>), [adventofcode](<https://devfeed.tech/tags/adventofcode.md>), [codenewbie](<https://devfeed.tech/tags/codenewbie.md>), [coding](<https://devfeed.tech/tags/coding.md>), [community](<https://devfeed.tech/tags/community.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ide](<https://devfeed.tech/tags/ide.md>), [inclusive](<https://devfeed.tech/tags/inclusive.md>), [intellij-idea](<https://devfeed.tech/tags/intellij-idea.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [software](<https://devfeed.tech/tags/software.md>), [solutions](<https://devfeed.tech/tags/solutions.md>)

## AI overview

A tutorial introduces Advent of Code as a way to practice Kotlin and presents solutions for the 2020 challenges, beginning with Day 1's Report Repair task. It explains how to set up a Kotlin project, use IntelliJ IDEA or an online editor, and solve the task by finding two or three entries that sum to 2020.

## Source excerpt

What's the best way to learn a language other than writing some code with it? Solving fun and short tasks like the ones from Advent of Code might be a great opportunity to practice your language skills, and you can learn a lot if you compare your solutions with how others have solved the same problem. Lots of developers from around the world, including some from the Kotlin team, take part in the Advent of Code challenges created by Eric Wastl. Advent of Code is a series of tasks published every December, which you solve and compete with others. Many would agree that it's the best advent calendar to celebrate Christmas and New Year! To help the community learn idiomatic Kotlin, and motivate more developers to solve Advent of Code tasks in Kotlin in the future, we decided to prepare solutions for the tasks from Advent of Code 2020. It doesn't matter if you solved it back in December, you're ready to solve it now, or you just want to check the solutions - we hope you'll find something useful in these materials. Of course, it works best if you try to solve the same task first yourself! Below is the solution and video for the first task. If you find this format useful and want us to cover more tasks in a similar fashion, please share in the comments! Day 1. Report Repair We're fixing an expense report! Find the full task description at https://adventofcode.com/2020/day/1*. You need to find the two (and in the second part, three) entries from the list of numbers that sum to 2020 and then multiply those two (or three) numbers together. How to solve the task Register at https://adventofcode.com/, open the task at https://adventofcode.com/2020/day/1, write your solution in Kotlin, and check the result on the site. You can either write Kotlin code online or using an IDE: download the free Community Edition of IntelliJ IDEA create a Kotlin project write your solution there Finally, compare your solution with the solution below. We marked the src folder as a source set to put t