#ABC155B. Papers, Please
Papers, Please
题目描述
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 or .
If the immigrant should be allowed entry according to the regulation, output APPROVED
; otherwise, print DENIED
.
你是 AtCoder 王国的一名移民官。移民携带的证件上写有一些整数,您需要检查这些整数是否符合某些标准。
根据规定,只有满足以下条件,移民才能获准进入王国:
- 证件上写的所有偶数都能被 或 整除。
如果根据规定允许该移民入境,则输出
APPROVED
;否则,打印DENIED
。
输入格式
输入内容按以下格式标准输入:
输出格式
如果根据规定,该移民应获准入境,则打印 APPROVED
;否则,打印 DENIED
。
样例 #1
样例输入 #1
5
6 7 9 10 31
样例输出 #1
APPROVED
样例 #2
样例输入 #2
3
28 27 24
样例输出 #2
DENIED
说明
数据规模与约定
- 所有输入值均为整数。
样例 解释
写在文档上的偶数是 和 。
所有这些数字都能被 或 整除,因此移民应获准入境。
样例 解释
违反了条件,因此不允许该移民入境。