結果
| 問題 |
No.1329 Square Sqsq
|
| コンテスト | |
| ユーザー |
onsen_manjuuu
|
| 提出日時 | 2021-01-08 21:25:01 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 547 bytes |
| コンパイル時間 | 7,893 ms |
| コンパイル使用メモリ | 452,948 KB |
| 最終ジャッジ日時 | 2025-01-17 11:11:49 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 19 |
ソースコード
#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