Advertisement
kirya_shkolnik

25 Задание

Jul 2nd, 2020
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. const int N = 2020;
  6.  
  7. int main(){
  8.     int a[N];
  9.     int i,m,k;
  10.     for(i = 0; i< N; ++i)
  11.         cin >> a[i];
  12.     m = 99999;
  13.     for(i=0; i < N; ++i)if(a[i] % 2 != 0 and a[i]/2%2!=0 and a[i] < m) m=a[i];
  14.     for(i=0; i < N; ++i)if(a[i]%2==0 and a[i] > m) a[i] -= m;
  15.     for(i=0; i < N; ++i)cout << a[i];
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement