fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int main(){
  6. int i,t,kase,n,j,k,kelu;
  7. long num;
  8. int ara[10000];
  9. char number[1000009];
  10. scanf("%d",&t);
  11. for(kase=1;kase<=t;kase++){
  12. scanf("%d",&n);
  13.  
  14. for(i=0;i<n;i++){
  15. scanf("%d",&ara[i]);
  16. }
  17. scanf("%ld",&num);
  18.  
  19. for(i=0,j=0;i<n;i++){
  20. for(k=1;k<=num;k++){
  21. if(k%ara[i]==0){
  22. number[j]=k;
  23. j++;
  24. }
  25. }
  26. }
  27. sort(number,number+j);
  28. reverse(number,number+j);
  29.  
  30. kelu=0;
  31. for(i=0;i<j;i++){
  32. if(number[i]!=number[i+1]){
  33. kelu++;
  34. }
  35. }
  36. printf("%d\n",kelu);
  37.  
  38.  
  39. }
  40.  
  41. return 0;
  42. }
  43.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:24: fatal error: bits/stdc++.h: No such file or directory
compilation terminated.
stdout
Standard output is empty