# include <stdio.h>
# include <string.h>
# include <math.h>
main()
{
int n,i,t=0;
scanf("%d",&n);
int a[n],x=n;
for(i=0;i<n;i++)
{
a[i]=i+1;
}
while(x!=1)
{
for(i=0;i<n;i++)
{
if(a[i]!=0)
{
t++;
if(t==3)
{
a[i]=0;
t=0;
x--;
}
}
}
}
for(i=0;i<n;i++)
{
if(a[i]!=0)
{
printf("%d",a[i]);
}
}
}
1047
最新推荐文章于 2023-11-21 15:37:17 发布