G10185 - TrianguloRectangulo Grado 10

no tags 

Hacer  un programa que solicite la cantidad de filas para dibujar un triángulo rectángulo con números primos. El triángulo dibujado contiene la serie descendente de números primos, desde el 1000.

Input

Número entero que indica la cantidad de fílas para dibujar el triángulo

Output

Serie descendente de números primos, desde el 1000.

Example

Input:
4

Output:
997
991 983
977 971 967
953 947 941 937

hide comments
pistachio: 2019-11-08 11:53:17

The example is incorrect. In input should be 4, the very first no in output should be 997 and there shouldn't be any blank lines between rows of the triangle.
[Simes]: corrected

Last edit: 2025-05-24 22:08:41

Added by:MaratónAFDM
Date:2018-09-27
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C NCSHARP CSHARP C++ 4.3.2 JAVA JULIA PYTHON PYPY3 PYTHON3