T3000

Untitled

Nov 14th, 2021
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     long long t,a,x,y;
  8.     cin>>t>>a;
  9.     y=0;
  10.     while(t>0)
  11.     {
  12.         cin>>x;
  13.  
  14.         if(a>=x)
  15.         {
  16.             cout<<"It hadn't snowed this early in"<<" "<<y<<" "<<"years!"<<endl;
  17.  
  18.             break;
  19.         }
  20.         else  if(y==t-1)
  21.         {
  22.  
  23.             cout<<"It had never snowed this early!"<<endl;
  24.  
  25.  
  26.         }
  27.         else
  28.         {
  29.             y+=1;
  30.         }
  31.  
  32.  
  33.     }
  34.     return 0;
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment