Multiples of 5
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given an array of n integers, your task is to identify and output all numbers that are divisible by 5, in reverse order. If no such numbers exist, output NO.
Input
The first line contains the integer n (1 ≤ n ≤ 100), representing the number of elements in the array. The second line contains n integers, each with an absolute value not exceeding 100.
Output
First, output the count of numbers that are divisible by 5. Then, on the next line, list these numbers in reverse order. If there are no numbers divisible by 5, output "NO".
Examples
Input #1
Answer #1
Submissions 636
Acceptance rate 36%