Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problema: http://www.pbinfo.ro/?pagina=probleme&id=546
- #include <iostream>
- #include <cassert>
- using namespace std;
- int main(){
- int n, v[1005];
- cin >> n;
- for(int i = 0 ; i < n ; ++ i)
- cin >> v[i];
- for(int i = 0 ; i < n ; ++i)
- if(v[i] % v[n-1] == 0)
- cout << v[i] << " ";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement