結果

問題 No.1329 Square Sqsq
ユーザー くれちー
提出日時 2021-01-08 21:34:06
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 380 bytes
コンパイル時間 7,873 ms
コンパイル使用メモリ 342,636 KB
最終ジャッジ日時 2025-01-17 11:22:31
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 TLE * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <boost/multiprecision/cpp_int.hpp>
#include <iostream>

using boost::multiprecision::cpp_int;

int main() {
  cpp_int n;
  std::cin >> n;

  cpp_int ng = n, ok = 0;
  while (ng - ok > 1) {
    cpp_int mid = (ng + ok) / 2;
    if (mid * mid <= n) {
      ok = mid;
    } else {
      ng = mid;
    }
  }
  size_t ans = ok.str().size();

  std::cout << ans << std::endl;
}
0