Advertisement
Spocoman

03. Pipes

Nov 23rd, 2023
899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int pipeCount;
  7.     cin >> pipeCount;
  8.  
  9.     int* checkup = new int[pipeCount];
  10.     int* installation = new int[pipeCount];
  11.  
  12.     for (int i = 0; i < pipeCount; i++) {
  13.         cin >> checkup[i];
  14.     }
  15.  
  16.     for (int i = 0; i < pipeCount; i++) {
  17.         cin >> installation[i];
  18.     }
  19.  
  20.     for (int i = 0; i < pipeCount; i++) {
  21.         cout << installation[i] / (installation[i] - checkup[i]) << ' ';
  22.     }
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement