結果

問題 No.1162 Many Quotients hard
ユーザー kekenx
提出日時 2022-11-17 19:40:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 307 bytes
コンパイル時間 1,702 ms
コンパイル使用メモリ 192,024 KB
最終ジャッジ日時 2025-02-08 20:53:42
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25 TLE * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main() {
  long long n;
  cin >> n;

  long long ans = 0;
  long long cur = 1;
  while (1) {
    long long d = n / cur;
    if (d >= cur) {
      cur++;
      ans++;
    } else {
      ans += d;
      break;
    }
  }
  cout << ans << '\n';
  return 0;
}
0