fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. cin>>n;
  8. bool flag=false;
  9. int j=-1;
  10. for(int i=0;i<n;i++){
  11. int x;
  12. cin>>x;
  13. if (x<=2.5){
  14. flag=true;
  15. j=i+1;
  16. break;
  17. }
  18. }
  19. if (!flag) cout<<"Not Found";
  20. else cout<<j;
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5304KB
stdin
6
4 6 -7 86 -6 5
stdout
3