9 条题解

  • -1
    @ 2024-7-20 10:36:34
    #include<iostream>
    using namespace std;
    int a,flag,pick;
    long long x;
    int main()
    {
    	cin>>a;
    	while(a)
    	{
    		
    		x++;
    		int t=1+(a-1)/3;
    		if((a-1)%3==0&&pick==0){
    			pick=x;
    		}
    		a-=t;
    	}
    	cout<<x<<' '<<pick;
    	return 0;
    }
    

    信息

    ID
    2235
    时间
    1000ms
    内存
    512MiB
    难度
    7
    标签
    递交数
    307
    已通过
    67
    上传者