結果
| 問題 | No.1329 Square Sqsq |
| コンテスト | |
| ユーザー |
onsen_manjuuu
|
| 提出日時 | 2021-01-08 21:25:01 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 5,381 ms |
| コンパイル使用メモリ | 548,996 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-16 10:30:56 |
| 合計ジャッジ時間 | 7,993 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pint = pair<int,int>;
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
namespace mp = boost::multiprecision;
using Int = mp::cpp_int; // 任意長整数
Int sqint(Int num){
Int l = 0;
Int r = num;
while(r - l > 1){
Int mid = (r + l) / 2;
(mid * mid <= num ? l : r) = mid;
}
return l;
}
int main()
{
Int N; cin >> N;
auto sq = sqint(N);
auto str = sq.str();
cout << str.size() << endl;
}
onsen_manjuuu