0分,为什么
查看原帖
0分,为什么
233829
smart_zyx楼主2024/8/12 21:17
#include<bits/stdc++.h>
#define maxn 101010
using namespace std;
int n;
int main()
{
	cin>>n;
	int f,s=0,i=n;
	while(i)
	{
		s++;
		if(i%3==1&&!f)
			f=s;
		if(!(i%3))
			i-=i/3;
		else
			i-=i/3+1;
	}
	cout<<s<<" "<<f;
	return 0;
}

2024/8/12 21:17
加载中...