Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n;
- long long m,v[103];
- int main()
- {
- cin>>n;
- for(int i=1; i<n; i++)
- cin>>v[i];
- cin>>m;
- for(int i=1; i<n; i++)
- if(v[i]%m!=0)
- {
- cout<<"NU";
- return 0;
- }
- cout<<"DA";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement