結果
| 問題 |
No.3037 トグルトグルトグル!
|
| コンテスト | |
| ユーザー |
tobbie
|
| 提出日時 | 2025-04-10 13:21:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 398 ms / 2,000 ms |
| コード長 | 295 bytes |
| コンパイル時間 | 2,819 ms |
| コンパイル使用メモリ | 192,884 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-10 13:21:29 |
| 合計ジャッジ時間 | 4,144 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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