5 条题解

  • 1
    @ 2025-2-3 10:54:33
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	double x;
    	int i=1,n;
    	cin>>x>>n;
    	while(i<=n){
    		 x=x+x*0.001;
    		 i++;  
    	}cout<<fixed<<setprecision(4)<<x;
    	return 0;
    }
    
    • 1
      @ 2025-1-26 12:41:11
      #include<bits/stdc++.h>
      using namespace std;
      int main(){
          double x,n;
          cin>>x>>n;
          while(n>0){
              x+=x*0.001;
              n--;
          }
          printf("%0.4lf",x);
          return 0;
      }
      
      • 1
        @ 2025-1-19 18:48:33
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
        	double x,n;
        	cin >> x >> n;
        	while(n > 0){
        		x = x + x / 1000;//x * 100.1%
        		n--;//剩余年数-1
        	}
        	printf("%.4lf",x);//保留4位小数
        
        	return 0;
        }
        
        • 0
          @ 2025-1-20 14:21:06
          #include <bits/stdc++.h>
          #include <cmath>
          #include <iostream>
          #include <iomanip>
          using namespace std;
          
          int main(){
          	double x;
              int n;
              cin>>x>>n;
              int i = 0;
              while(i<n){
                  x=x*1.001;
                  i++;
              }
              cout <<fixed<<setprecision(4)<<x;
          }
          
          • 0
            @ 2025-1-19 20:21:47
            using namespace std;
            int b;
            double a;
            int main()
            {
            	cin>>a>>b;
            	for(int i=1;i<=b;i++) 
            		a = a / 100 * 100.1;
            	printf("%.4lf",a);
             	return 0;
            }
            `
            
            
            
            • 1

            信息

            ID
            61
            时间
            1000ms
            内存
            128MiB
            难度
            5
            标签
            (无)
            递交数
            154
            已通过
            54
            上传者