5 solutions

  • 2
    @ 2024-1-27 10:41:28
    #include<bits/stdc++.h>
    using namespace std;
    double x;
    int n;
    int main(){
    	cin>>x>>n;
    	for(int i=0;i<n;i++){
    		x*=(1+0.001);
    	}
    	cout<<fixed<<setprecision(4)<<x<<endl;
    	return 0;
    }
    
    • 1
      @ 2024-12-24 13:35:18

      #include <bits/stdc++.h>
      using namespace std;
      
      int main()
      {
      	int n;
      	double ans;
      	cin >> ans;
      	cin >> n;
      	for(int i = 1; i <= n; i++)
      	{
      		ans*=1.001;
      	}
      	printf("%.4f", ans);
      	
      	
      	return 0;
       }
      
      • 1
        @ 2023-9-17 12:02:59
        //水题一道
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
        	double n;
        	int m;
        	cin>>n>>m;
        	for(int i=1;i<=m;i++) n=n+n*0.001;
        	printf("%.4f",n);
        	return 0;
        }
        
        • 1
          @ 2023-9-16 17:06:33

          #include<bits/stdc++.h>

          using namespace std;

          int main()

          {

          float n;

          int i,m;

          cin>>n>>m;

          for(i=1;i<=m;i++)

          n=n+n*0.001;

          printf("%.4f",n);

          return 0;

          }

          //点个赞吧!——李尤

          • 0
            @ 2023-9-17 22:48:17

            #include using namespace std; int main() { long long x,n; cin>>x>>n; double s=x; for(int i=1;i<=n;i++) { s*=(1+0.001); } printf("%.4f",s); }

            • 1

            Information

            ID
            559
            Time
            1000ms
            Memory
            256MiB
            Difficulty
            1
            Tags
            # Submissions
            41
            Accepted
            33
            Uploaded By