← November 2025 questions

NOVEMBER 2025 / BEGINNER / QUESTION 1

String Reversal

Archived question

Try the question in your own editor, then check your output below.

THE QUESTION

Text from the official booklet. Refer to the PDF for original mathematical notation, formatting, and linked input files. Printed samples and inputs are reproduced as published.

A robot has sent you a secret command string.
Task: Write a program that prints this string in reverse. The reversed string should
have all characters in the opposite order. Preserve all letters, numbers, dashes, and
symbols exactly as in the original string. Print the following string in reverse:
QXZ93ALPHA-ROBOT-INVASION-DELTA-4930-ZETA-MK77-OMEGA-PROTOCOL-
START-SEQUENCE-9981-PLASMA-MODULE-GAMMA-DRIVE-CORE-STABILIZER
-ULTRA-NODE-5567-NEUTRON-FIELD-COMPRESSOR-VOLTAGE-RAY-TRANSMITTER
-ALLOY-CIRCUITRY-OMEGA-REBOOT-CYCLE-PRIME-DELTA-SECTOR-4411

CHECK YOUR ANSWER

Try your answer.

Run your program in your own editor, then paste its output below. This checks the stated output; it does not assess your full program. Practice attempts do not affect competition scores.

Reverse the entire command, joining the printed line wraps first. Submit one continuous string.

Reveal worked answer

Your output

1144-ROTCES-ATLED-EMIRP-ELCYC-TOOBER-AGEMO-YRTIUCRIC-YOLLA-RETTIMSNART-YAR-EGATLOV-ROSSERPMOC-DLEIF-NORTUEN-7655-EDON-ARTLU-REZILIBATS-EROC-EVIRD-AMMAG-ELUDOM-AMSALP-1899-ECNEUQES-TRATS-LOCOTORP-AGEMO-77KM-ATEZ-0394-ATLED-NOISAVNI-TOBOR-AHPLA39ZXQ

Join the wrapped command without adding spaces, then take command[::-1].

Source: Girls in Code SEA 2025 Fall Competition, 29 November 2025. Booklet created by Emily Xu and the GIC question authors. Shared for non-commercial educational use with attribution, as permitted in the booklet.