fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. double n,t = 101;
  7. int size;
  8. int counter = 0;
  9. cin >> size;
  10. for(int i = 0; i < size; i++){
  11. cin >> n;
  12. if(n <= 2.5){
  13. t = n;
  14. counter = i+1;
  15. cout << counter <<' '<< fixed << setprecision(2) << n;
  16. break;
  17. }
  18. }
  19. if(t == 101){
  20. cout << "Not Found";
  21. }
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 4392KB
stdin
5
6 7.5 2.1 2.0 0
stdout
3 2.10