diff --git a/easy/day_5/solution.cpp b/easy/day_5/solution.cpp index c6ee274..1163e6f 100644 --- a/easy/day_5/solution.cpp +++ b/easy/day_5/solution.cpp @@ -1 +1,24 @@ -//Write your code here +#include +using namespace std; +int main(){ + int t; + cin >> t; + while(t--) { + int n; + cin >> n; + long long int prev; + cin >> prev; + cout << prev << " "; + for(int i = 1 ; i < n ; i++){ + long long int temp; + cin >> temp; + if(temp%prev == 0){ + temp++; + } + cout << temp << " "; + prev = temp; + } + cout << endl; + } + return 0; +} \ No newline at end of file