結果
| 問題 | No.3037 トグルトグルトグル! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-02 11:42:22 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 869 ms |
| コンパイル使用メモリ | 158,952 KB |
| 実行使用メモリ | 5,760 KB |
| 最終ジャッジ日時 | 2026-07-06 22:05:42 |
| 合計ジャッジ時間 | 1,972 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <cstdint>
#include <vector>
using namespace std;
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
uint64_t N;
cin >> N;
uint32_t l = 0, r = 1'000'000'001;
while (l + 1 < r)
{
const auto c = (l + r) >> 1;
if (static_cast<uint64_t>(c) * c <= N) l = c;
else r = c;
}
cout << l << '\n';
return 0;
}