0.55 A friend of Professor Oak suggested him including some aromatic plants in his garden, and Prof. Oak thought that it was such a good idea. As you can see, now he has 11 such plants: 5 in the top row, and 6 in the bottom row. Hmm... so we have a prime number and a composite number that add up to a prime number. How common is that?
0.40
Input consists of several cases, each with an integer between 2 and .
For every , print the number of triples of integer numbers such that:
the three numbers are between 2 and ,
is prime, is composite, is prime,
and .
Author: Salvador Roura
Event: Vint-i-quatrè Concurs de Programació de la UPC -
Semifinal
Date: 2026-06-18
Generation: 2026-06-10T18:32:17.892Z
© Jutge.org, 2006–2026.
https://jutge.org