6 条题解

  • 1
    @ 2023-3-19 19:47:14
    #include<iostream>
    using namespace std;
    int main(){
    	double h,sum=0;
    	cin>>h;
    	sum=h;
    	for(int i=1;i<=9;i++){
    		h/=2;
    		sum+=h*2;
    	}
    	cout<<sum<<endl<<h/2;
    	return 0;
    }
    
    
    • 0
      @ 2023-3-19 19:53:06

      #include<iostream> #include<string> #include<cstdio> using namespace std; double a,b; int main(){ cin>>a; b=a; for(int i=1;i<10;i++){

          1. a
      ```/=2;
      b=b+a*2;
               }
               cout<<b<<endl<<a/2;
               return 0;
               }
      
      • 0
        @ 2023-3-19 19:52:16

        #include<iostream> #include<string> #include<cstdio> using namespace std; double a,b; int main(){ cin>>a; b=a; for(int i=1;i<10;i++){ a/=2; b=b+a*2; } cout<<b<<endl<<a/2; return 0; }

        • 0
          #include <iostream>
          #include <cstdio>
          #include <stdio.h>
          #include <cmath>
          #include <iomanip>
          #include <algorithm>
          using namespace std;
          #define LL long long
          const int N = 1e5 + 10;
          const int INF = 0x3f3f3f3f;
          int main()
          {
              double h,a = 0;
              cin>>h;
              for(int i = 1;i<=10;i++)
              {
                  a = a+1.5*h;
                  h = h/2;
              }
              cout<<a-h<<endl<<h;
          }
          
          • -1
            @ 2023-3-19 17:59:40

            #include<bits/stdc++.h>

            using namespace std;

            int main(){

            double h,a = 0;

            cin>>h;

            for(int i = 1;i<=10;i++){

            a = a+1.5*h;

            h = h/2;

            }

            cout<<a-h<<endl<<h;

            }

            • -1
              @ 2023-1-14 9:24:18

              #include<bits/stdc++.h>

              using namespace std;

              int main(){

              double h,a = 0;

              cin>>h;

              for(int i = 1;i<=10;i++){

              a = a+1.5*h;

              h = h/2;

              }

              cout<<a-h<<endl<<h;

              }

              • 1

              信息

              ID
              938
              时间
              1000ms
              内存
              128MiB
              难度
              3
              标签
              递交数
              124
              已通过
              65
              上传者