2 solutions

  • 1
    @ 2024-8-16 12:17:30
    #include<stdio.h>
    int main(){
        int T;
        scanf("%d",&T);
    
        int  total_score=0;
        for(int i=0;i<T;i++){
            int s,n;
            scanf("%d %d",&s,&n);
            int m=s*7/10;
            for(int o=0; o<n;o++){
                s=s*95/100;
            }
            if(m>s){
                total_score+=m;
            }else(total_score+=s);
            
        }
        printf("%d",total_score);
        return 0;
    }
    
    • 0
      @ 2024-4-10 20:24:07
      #include<iostream>
      using namespace std;
      int main()
      {   int t;
          int s[105],n[105];
          cin>>t;
          int sum = 0;
          for(int i = 1;i <= t;i++)
          {
            cin>>s[i]>>n[i];
            int u = s[i];
           if(n[i]) for(int j = 1;j <= n[i];j++)u= u*95/100;
            int r = s[i]*7/10;
            sum += max(u,r);
          }
          printf("%d",sum);
          return 0;
      }
      
      • 1

      Information

      ID
      6962
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      7
      Tags
      # Submissions
      88
      Accepted
      19
      Uploaded By