fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int tab[100];
  7.  
  8. for(int i=0;i<100;i++) {
  9. cin >> tab[i];
  10. }
  11.  
  12. int q;
  13. cin >> q;
  14.  
  15. for (int i = 0; i < q; i++) {
  16. int k;
  17. cin >> k;
  18. cout << tab[k - 1] << endl;
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty