Advertisement
jgsp2

horror dash

Aug 19th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     ios::sync_with_stdio(0); cin.tie(0);
  7.     int t,k=0;
  8.     string s;
  9.     cin>>t;
  10.     getline(cin,s);
  11.     while(t--){
  12.         k++;
  13.         getline(cin,s);
  14.         stringstream ss;
  15.         ss.str(s);
  16.        
  17.         int ans=-1,v;
  18.         while(ss>>v) ans = max(ans,v);
  19.        
  20.         cout<<"Case "<<k<<": "<<ans<<endl;
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement