Ad
Code
Diff
  • unsigned long long div2(unsigned long long a){
      unsigned long long ans{};
      while (ans * 2 + 1 < a) ans++;
      return ans;
    }
    • unsigned long long div2(unsigned long long a){
    • unsigned long long ans{};
    • while (ans + ans + 1 < a) ans++;
    • while (ans * 2 + 1 < a) ans++;
    • return ans;
    • }