Advertisement
Farjana_akter

Untitled

Mar 20th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3.  
  4.  
  5. int main()
  6. {
  7. long long int n,i,j,k;
  8. scanf("%lld",&n);
  9. long long int arr[n+5],mx=0,cnt=0;
  10.  
  11. for(i=0;i<n;i++)
  12. {
  13. scanf("%lld",&arr[i]);
  14. if(arr[i]>=mx)
  15. {
  16. mx=arr[i];
  17. cnt++;
  18. }
  19. }
  20. if(cnt>1)
  21. printf("The world is doomed! :(\n");
  22. else
  23. printf("%lld\n",mx);
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement