A ZIO aspirant should be able to read input, use variables and conditions, write loops, work with arrays and strings, and break code into functions, all without having to look anything up. These are the building blocks of every contest solution, and weakness in any one of them costs marks no matter how clever the idea is.

Why basics decide more than you think

In a timed paper, hesitating over how a loop works or how to read a line of input burns minutes and nerves. Students who have automated the basics can spend their attention on the real problem. Fluency, not cleverness, is what basics buy you.

The checklist

Input and output

  • Read a single number, several numbers on one line, and many lines.
  • Print results in exactly the format the problem asks for.
  • Handle the case where the number of inputs is given first.

Variables and arithmetic

  • Integer and decimal types, and when each is correct.
  • Division and remainder, which come up constantly in contest problems.
  • Awareness of very large values and how your language handles them.

Conditions

  • If, else-if and else, and combining conditions with and, or and not.
  • Careful use of boundary comparisons, since off-by-one errors are the commonest bug.

Loops

  • For and while loops, and nested loops.
  • Using a loop to accumulate a total, count items or find a maximum.
  • Stopping early with break when the answer is found.

Arrays (lists) and strings

  • Creating, filling and traversing an array; index starts at zero.
  • Reading characters in a string, comparing strings and building new ones.
  • Basic sorting using the language's built-in function.

Functions

  • Writing a small function with parameters and a return value.
  • Using functions to keep code short and easy to debug.

Got a question about this?

Talk to a Code Ninja Program mentor directly โ€” no form, just a quick WhatsApp chat.

Chat on WhatsAppExplore Code Ninja Programโ†’

How to check you have really mastered them

Pick ten easy problems and solve each within fifteen minutes, with no searching. If you can, the basics are in place. If you cannot, the problems that slow you down tell you exactly which topic to revisit.

Habits that make code safer

  • Use clear variable names; you will read your own code under pressure.
  • Print intermediate values while debugging, then remove them before submitting.
  • Run your code on a tiny example before any large one.