水题

HDOJ2013_蟠桃记

HDOJ2013_蟠桃记

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>

int main()
{
	int i,j;
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		int sum=1;
		for(i=n;i>1;i--)
		{
			sum=(sum+1)*2;
		}
		printf("%d\n",sum);
	}
	return 0;
}

相关文章:

  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-19
  • 2021-08-05
  • 2022-01-27
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案