Advertisement
Saleh127

uri 1185

Sep 3rd, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; while(t--)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. double a[100][100],f=0.0;
  11. ll c,d,e,i,j,k=10,l=0;
  12. char x;
  13. cin>>x;
  14. for(i=0;i<=11;i++)
  15. {
  16. for(j=0;j<=11;j++)
  17. {
  18. cin>>a[i][j];
  19. }
  20. }
  21. for(i=0;i<=10;i++)
  22. {
  23. for(j=0;j<=k;j++)
  24. {
  25. f+=a[i][j];
  26. }
  27. k--;
  28. }
  29. if(x=='S') printf("%.1lf\n",f);
  30. else printf("%.1lf\n",f/66.0);
  31.  
  32. return 0;
  33. }
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement