3 条题解

  • 0
    @ 2023-9-10 11:54:31
    /************************************
    Note Book:
    ************************************/
    #include <iostream>
    #include <cstdio>
    #include <iomanip>
    #include <cmath>
    #include <algorithm>
    #include <cstring>
    #include <string>
    #include <stack>
    #include <queue>
    #include <math.h>
    #define LL long long
    using namespace std;
    const int INF = 0x3f3f3f3f;
    const int N = 1e5 + 10;
    int n , shuliang = 1; 
    int main()
    {
    	cin >> n;
    	while( n-- )
    	{
    		shuliang = shuliang + 1;
    		shuliang = shuliang * 2; 
    	}
    	cout << shuliang;
    	return 0;
    }
    
    
    
    • 0
      @ 2023-2-4 21:11:13
      #include<bits/stdc++.h>
      #include <math.h>
      #include <stack>
      #include <stdio.h>
      #include <iostream>
      #include <vector>
      #include <iomanip>
      #include <string>
      #include <algorithm>
      using namespace std;
      int main(){
          int n,m=1;
          cin>>n;
          while(n>0){
              m=(m+1)*2;
              n--;
          }
          cout<<m;
      }
      
      • 0
        @ 2022-7-11 9:21:31

        //dev c++[[990.cpp]]*******

        //dev c++[top fanil]]******

        //dev c++*www.temege.com

        #include <stdio.h>

        #include <iostream>

        #include <math.h>

        #include <queue>

        #include <stack>

        #include <vector>

        #include <iomanip>

        #include <string.h>

        #include <algorithm>

        using namespace std;

        #define LL long long

        const int N=1e6+10;

        const int INF=0x3f3f3f3f;

        int a[110];

        int main()

        {

        int n;
        
        cin>>n;
        
        int sum=1;
        
        while(n--)
        
        {
        
        	sum=(sum+1)*2;
        
        }
        
        cout<<sum<<endl;
        
        return 0;
        

        }

        • 1

        信息

        ID
        1954
        时间
        1000ms
        内存
        128MiB
        难度
        3
        标签
        递交数
        145
        已通过
        78
        上传者