3 条题解

  • 0
    @ 2023-1-17 11:32:31
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	double n;
    	cin >> n;
    	const int N = 10000;
    	double Y[N];
    	int g = 0;
    	double S = 13;
    	for (int i = 1; i <= 9999; i++)
    	{
    		S = S * ((100 + n) / 100);
    		if (S >= 20)
    		{
    			Y[g] = i;
    			g++;
    		}
    			
    	}
    	cout << Y[0];
    	
    }
    
    
    
    • 0
      @ 2021-5-24 13:43:02

      C++ :

      #include <iostream>
      #include <cstdio>
      #define N=1000
      using namespace std;
       double k=13;
      int main()
      {   int n,b=0;
          scanf("%d",&n);
          double m;
      
          m=n*1.0/100;
         while(k<=20){
      
          k=k*(1+m)*1.0;
          b++;
         }
          printf("%d\n",b);
      
          return 0;
      }
      
      
      • -1
        @ 2025-2-24 12:44:35
        #include<bits/stdc++.h>
        using namespace std;
        double x,peo=1300000000,cnt;
        int main(){
            cin>>x;
            x=x/100;
            while(1){
                peo*=(1+x);
                cnt++;
                if(peo>=2000000000){
                    cout<<cnt;
                    return 0;
                }
            }
            return 0;
        }
        
        • 1

        信息

        ID
        113
        时间
        1000ms
        内存
        128MiB
        难度
        3
        标签
        递交数
        119
        已通过
        66
        上传者