Saleh127

uri 1190

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