結果
| 問題 | No.3037 トグルトグルトグル! |
| コンテスト | |
| ユーザー |
tobbie
|
| 提出日時 | 2025-04-10 13:21:23 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 298 ms / 2,000 ms |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 2,337 ms |
| コンパイル使用メモリ | 208,304 KB |
| 実行使用メモリ | 9,176 KB |
| 最終ジャッジ日時 | 2026-07-08 15:19:23 |
| 合計ジャッジ時間 | 4,597 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using ll = long long int;
int main() {
ll n;
cin >> n;
ll i = 0;
int ans = 0;
ll p = 2;
while (i < n) {
ans++;
i += p + 1;
p += 2;
}
cout << ans << endl;
return 0;
}
tobbie