ORDEIMP - Secuencia ordenada e impares

no tags 

in English

A natural number N and then a sequence of N positive integers is entered. Report "1" if the sequence sorted in ascending order or "0" otherwise. Moreover report the quantity of odd numbers that exist within the sequence.

Input

Natural number + sequence of positive integers.

Output

Report "0" or "1", and quantity of odd numbers.

Example 1

Input:
5
3
7
2
10
45 Output: 0 3

en Español

Se ingresa un  número natural N y a continuación una secuencia de N números enteros positivos. Informar un 1 si la secuencia se encuentra ordenada ascendentemente o un 0  caso contrario. Además informar la cantidad de números impares que existen dentro de la secuencia.

Entrada

Número natural + Secuencia de enteros positivos.

Salida

Informar "0"o "1" y cantidad de impares.

Ejemplo 1

Input:
5
3
7
2
10
45 Output: 0 3

hide comments
nadstratosfer: 2018-03-25 04:31:19

Follow example testcase in the spanish version. The output for the english case is "1 4".
[Simes]: fixed

Last edit: 2023-04-28 10:52:24

Added by:Coach UTN FRSF
Date:2015-08-13
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU JS-MONKEY