ARN aminoacids

An ARN aminoacid is a sequence of nucleotides. Each nucleotid is formed
by a combination of three nitrogenous bases (Adenine (A), Guanine (G),
or Uracil (U)). Given a sequence of ARN aminoacids, we want to count how
many nucleotides contain Guanine in each aminoacid. If one of the
aminoacids contains the nucleotid GUA, the program should stop and print
a warning.

Input

The input is a sequence of aminoacids. Each aminoacid is a sequence of
nucleotids, ended with the stop nucleotid UAA.

Output

The output is the number of nucleotids containing Guanine (G) in each
aminoacid. If the nucleotid GUA is found in some aminoacid, the process
must stop and a warning printed. Follow the format of the examples.

Problem information

Author: Lluís Padró

Generation: 2026-01-25T14:31:24.646Z

© Jutge.org, 2006–2026.
https://jutge.org
