Advertisement
Saleh127

uri 1186

Sep 3rd, 2020 (edited)
102
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=1;i<=11;i++)
  22. {
  23. for(j=11;j>=11-i+1;j--)
  24. {
  25. f+=a[i][j];
  26. }
  27. }
  28. if(x=='S') printf("%.1lf\n",f);
  29. else printf("%.1lf\n",f/66.0);
  30.  
  31. return 0;
  32. }
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement