11 条题解

  • 0
    @ 2025-5-27 13:22:13

    #include using namespace std; int maxcola(int n) { int empty = n; int total = n; while(empty >= 3) { int newcola = empty / 3; total += newcola;
    empty = empty % 3 + newcola; } return total; } int main() { int n; cin >> n; cout << maxcola(n); return 0;
    }

    信息

    ID
    914
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    递交数
    853
    已通过
    325
    上传者