2 条题解

  • -1
    @ 2026-3-15 16:30:25

    #include<bits/stdc++.h> using namespace std; int main(){

    return 0;
    

    }

    • -3
      @ 2026-3-15 16:32:13

      #include<bits/stdc++.h> using namespace std; int main() { long long n, k; cin >> n >> k; if (n == 1) { cout << 0 << endl; return 0; } if (k == 0) { cout << -1 << endl; return 0; } long long time = 0; long long total = 1; while (total < n) { long long add = total * k; total += add; time++; if (total > 1e18) { break; } } cout << time << endl; return 0; }

      • 1

      信息

      ID
      241
      时间
      1000ms
      内存
      64MiB
      难度
      8
      标签
      递交数
      29
      已通过
      6
      上传者