AtCoder Beginner Contest 155
翻译中…
Problem Statement
翻译中…
You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria.
翻译中…
According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied:
翻译中…
- All even numbers written on the document are divisible by
$3$or$5$.
翻译中…
If the immigrant should be allowed entry according to the regulation, output APPROVED; otherwise, print DENIED.
翻译中…
Note
翻译中…
翻译中…
Constraints
翻译中…
- All values in input are integers.
$1 \leq N \leq 100$$1 \leq A_i \leq 1000$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
A_1 A_2 \dots A_N
翻译中…
Output
翻译中…
If the immigrant should be allowed entry according to the regulation, print APPROVED; otherwise, print DENIED.
翻译中…
样例
Input #1
5
6 7 9 10 31
Output #1
APPROVED
The even numbers written on the document are $6$ and $10$.
All of them are divisible by $3$ or $5$, so the immigrant should be allowed entry.
Input #2
3
28 27 24
Output #2
DENIED
$28$ violates the condition, so the immigrant should not be allowed entry.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。