A

题目没读, 啥也不会的室友帮我写的。

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 #define Fopen freopen("_in.txt","r",stdin); freopen("_out.txt","w",stdout);
 4 #define LL long long
 5 #define ULL unsigned LL
 6 #define fi first
 7 #define se second
 8 #define pb push_back
 9 #define lson l,m,rt<<1
10 #define rson m+1,r,rt<<1|1
11 #define max3(a,b,c) max(a,max(b,c))
12 #define min3(a,b,c) min(a,min(b,c))
13 typedef pair<int,int> pll;
14 const int INF = 0x3f3f3f3f;
15 const LL mod = 1e9+7;
16 const int N = 1e5+10;
17 
18 int main(){
19     ///Fopen;
20     int a;
21     cin>>a;
22     int b[a];
23     for(int i=0;i<a;i++){
24         cin>>b[i];
25     }
26     for(int i=0;i<a;i++){
27         if(b[i]%2==0) b[i]=b[i]-1;
28     }
29     for(int i=0;i<a;i++){
30         cout<<b[i]<<' ';
31     }
32     return 0;
33 }
A

相关文章:

  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案