Papers, Please

· · 个人记录

include<bits/stdc++.h>

using namespace std;

long long n, a;

int main() {

cin >>n;
for(int i = 1; i <= n; i++){
    cin >> a;
    if(a % 2 == 0){
        if(a % 3 == 0 || a % 5 == 0){
            cout << "APPROVED";
            break;
        } else {
            cout << "DENIED";
            break;
        }
    }
}

return 0;

}