Skip to content

Zweer/codingame

Repository files navigation

CodinGame

In this repository you'll find a bunch of solutions for the puzzles on the codingame platform.

Some of the puzzles have proper tests, others (mostly the complicated / interactive ones) won't.

🏆 Achievement Roadmap

Current progress: 164/273 achievements (7850/18295 pts)

Phase Goal Status Achievements Points
Explorer 1 puzzle in each language ✅ 27/27 languages +17 +220
Regular 3 puzzles in each language ✅ 27/27 languages +17 +255
Lover 7 puzzles in each language 5/27 languages +22 +440
Addict 15 puzzles in each language 2/27 languages +25 +750
Hard puzzles Specific hard puzzle achievements 0/6 done +13 +1625
Very Hard puzzles Specific very-hard puzzle achievements 2/7 done +13 +3500
Reviews Rate puzzle solutions 6/45 +3 +65

Strategy: Solve the same easy puzzle in all 27 languages at once (one IDE page, switch language, paste, submit). Each puzzle solved this way progresses all language achievements simultaneously.

Puzzles completed in all 27 languages: The Descent, Power of Thor Ep.1, Temperatures

Next: 4 more puzzles × 27 languages → all Lover achievements unlocked

Scripts

All scripts load credentials from .env (REMEMBER_ME cookie from codingame.com).

Script Description
npm run script:retrieve Fetch puzzle list from CodinGame API
npm run script:readme Update README with solved/unsolved status
npm run script:solve Auto-solve puzzles with Gemini
npm run script:submit-puzzle Submit a solution to any puzzle
npm run script:submit-optim Automated solver loop for optimization puzzles

Submit a puzzle solution

Submit any source file to a CG puzzle. Language is auto-detected from the file extension.

npm run script:submit-puzzle -- <puzzle-pretty-id> <source-file> [language]

# Examples:
npm run script:submit-puzzle -- temperatures src/01-easy/temperatures/index.ts
npm run script:submit-puzzle -- the-descent src/01-easy/the-descent/main.rs

Automated optimization puzzle solver

For optimization puzzles like Number Shifting where levels are solved progressively:

  1. A local solver binary reads the grid from stdin and writes moves to stdout
  2. The script wraps the solution in a Bash script and submits it to CG
  3. It extracts the next level from the replay and repeats
# 1. Compile the solver
rustc -O -o src/05-optim/number-shifting/solver_bin src/05-optim/number-shifting/solver.rs

# 2. Run the automated loop
npm run script:submit-optim -- number-shifting ./src/05-optim/number-shifting/solver_bin

State is saved in solver-state.json inside the puzzle directory, so you can interrupt and resume.

Puzzles

tutorial (1/1)

easy (309/309)

medium (378/378)

hard (188/188)

expert (42/42)

optim (17/17)

multi (93/93)

codegolf-easy (6/6)

codegolf-medium (6/6)

codegolf-hard (9/9)

codegolf-expert (6/6)

Ispiration from

About

Solutions to many CodinGame tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors