9 条题解

  • -1
    @ 2024-7-20 10:58:31

    #include <bits/stdc++.h> using namespace std; int n,ans2; void f(int day) { if(!ans2 && n % 3 == 1) ans2 = day + 1; if(n == 0) { cout << day << " " << ans2; return; } n -= ceil(n * 1.0 / 3); f(day + 1); return; } int main() { cin >> n; f(0); return 0; }

    信息

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