Advertisement
Saleh127

uri 1188

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