Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Print Odd Even Negative Integer Count

n,neg,odd,eve,m=int(input()),0,0,0,[int(i) for i in input().split()]
for i in m:
    if i<0:
        neg+=1
    elif i%2==0 :
        eve+=1
    else:
        odd+=1
print("{0} {1} {2}".format(odd,eve,neg))
Source by letuscrack.com #
 
PREVIOUS NEXT
Tagged: #Print #Odd #Even #Negative #Integer #Count
ADD COMMENT
Topic
Name
8+1 =