結果
| 問題 |
No.3037 トグルトグルトグル!
|
| コンテスト | |
| ユーザー |
zawakasu
|
| 提出日時 | 2025-02-28 21:29:44 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 657 bytes |
| コンパイル時間 | 933 ms |
| コンパイル使用メモリ | 119,460 KB |
| 実行使用メモリ | 8,480 KB |
| 最終ジャッジ日時 | 2025-03-07 08:46:13 |
| 合計ジャッジ時間 | 1,657 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <iomanip>
#include <cassert>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>
#include <numeric>
// #include "Src/Utility/BinarySearch.hpp"
// #include "Src/Sequence/CompressedSequence.hpp"
// #include "Src/Sequence/RunLengthEncoding.hpp"
// using namespace zawa;
// #include "atcoder/modint"
// using mint = atcoder::modint998244353;
long long N;
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
std::cout.tie(nullptr);
std::cin >> N;
long long ans = sqrtl(N);
while (ans * ans <= N) ans++;
while (ans * ans > N) ans--;
std::cout << ans << '\n';
}
zawakasu