Advertisement
Saleh127

UVA 10790

Sep 13th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. ///www.iamworldian.com/2019/02/uva-0790-how-many-points-of.html
  5. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);cout.tie(0);
  10.  
  11. ll a,c,d,e,f,i=0,j,k,l;
  12.  
  13. while(cin>>a>>c)
  14. {
  15. if(a+c==0) break;
  16. d=(a*(a-1)*c*(c-1))/4;
  17. cout<<"Case "<<++i<<": "<<d<<endl;
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement