1 条题解

  • 0
    @ 2025-10-8 16:59:24
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;scanf("%d",&n);
        int t1=0,t2=0,x=n;
        while(x)
    	{
    		t1++;
    		if(x%3==0)x=x-x/3;
    		else
    		{
    			if(x%3==1)if(t2==0)t2=t1;
    			x=x-x/3-1;
    		}
    	}
        printf("%d %d\n",t1,t2);
    	return 0;
    }
    
    • 1

    *【入门题练习(难度:3):数学模拟】[CSP-J 2023] 小苹果

    信息

    ID
    1970
    时间
    1000ms
    内存
    512MiB
    难度
    5
    标签
    递交数
    89
    已通过
    34
    上传者