Back
Close
  • 42621

What will I learn?

Conditions

Solving this puzzle helps you understand how the puzzles work on CodinGame (standard input parsing, game loop, writing to the standard output).

You can discover the platform with this simple exercise of basic comparison of values and try up to 25 programming languages.

LEARN SYNTAX TIPS WITH THIS PUZZLE

Ternary Operator by Nick

External resources

ConditionsStandard streams

Statement

A tutorial mission for all newcomers: your program must find which of the two targets is the closest.

Solve it

A higher resolution is required to access the IDE

Story

Defend the planet with a big laser cannon from the invading insectoid alien ships.

codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants