fork download
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main(){
  9.  
  10. int T;
  11. scanf("%d", &T);
  12. for(int i=0; i<T; i++){
  13. int N;
  14. scanf("%d", &N);
  15. int aTahun[101];
  16. for(int j=0; j<N; j++){
  17. cin >> aTahun[j];
  18. // scanf("%d", &aTahun[j]);
  19. }
  20.  
  21. sort(aTahun, aTahun+N);
  22. printf("Case #%d: %d\n", i+1);
  23. cout << aTahun[i] << endl;
  24. // printf("%d\n", aTahun[N]);
  25.  
  26. }
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0.01s 5408KB
stdin
2
3
2019
1986
1953
4
1945
2020
2000
2013

stdout
Case #1: 1986
1953
Case #2: 1682140564
2000