結果
問題 |
No.3037 トグルトグルトグル!
|
ユーザー |
|
提出日時 | 2025-03-02 11:42:22 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 707 ms |
コンパイル使用メモリ | 82,344 KB |
実行使用メモリ | 8,604 KB |
最終ジャッジ日時 | 2025-03-07 08:48:44 |
合計ジャッジ時間 | 1,315 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }