5 solutions

  • 0
    @ 2024-12-22 15:05:58
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
       double x;
       int n;
       cin>>x>>n;
       for(int i=1;i<=n;i++)
       {
       	  x=x*1.001;
       }
       cout<<fixed<<setprecision(4)<<x;
       return 0;
    }
    
    
    • 0
      @ 2024-7-5 11:31:51

      #include<bits/stdc++.h> using namespace std; int main() { double x,n; cin>>x>>n; for(int i=1;i<=n;i++) { x+=x*(0.1/100); } cout<<fixed<<setprecision(4)<<x; return 0; }

      • 0
        @ 2024-5-24 11:17:44
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
            double x;
            int n;
            cin>>x>>n;
            for(int i=1;i<=n;i++)
            {
                x=x*1.001;
            }
            cout<<fixed<<setprecision(4)<<x;
            return 0;
        }
        
        • -2
          @ 2024-7-5 11:32:07
          ```
          ``````
          `````````
          ````````````
          ```````````````
          ``````````````````
          `````````````````````
          ````````````````````````
          ```````````````````````````
          ``````````````````````````````
          `````````````````````````````````
          ````````````````````````````````````
          
          • -4
            @ 2024-5-24 19:10:23
            #include<bits/stdc++.h>
            using namespace std;
            int main()
            {
                double x;
                int n;
                cin>>x>>n;
                for(int i=1;i<=n;i++)
                {
                    x=x*1.001;
                }
                cout<<fixed<<setprecision(4)<<x;
                return 0;
            }
            
            • 1

            Information

            ID
            878
            Time
            1000ms
            Memory
            256MiB
            Difficulty
            1
            Tags
            (None)
            # Submissions
            107
            Accepted
            48
            Uploaded By