Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 25 задание пробник 2018г
- #include <iostream>
- using namespace std;
- const int N=2018;
- int main(){
- int a[N];
- int i,k,m;
- for(i = 0; i < N; ++i)
- cin >> a[i];
- m = 15001;
- for(i = 0; i < N; ++i)
- if (a[i] < m and a[i]%3==0) m = a[i];
- for(i = 0; i < N; ++i){
- if(a[i] % 2 == 0 and m!=15001) a[i] = a[i] - m;
- cout << a[i] << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement