結果
| 問題 | No.1664 Unstable f(n) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-03 21:29:54 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 240 bytes |
| 記録 | |
| コンパイル時間 | 833 ms |
| コンパイル使用メモリ | 179,712 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-10-04 00:37:45 |
| 合計ジャッジ時間 | 2,794 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 15 |
ソースコード
#include <bits/stdc++.h>
typedef long long ll;
const int maxn = 1005;
int a[maxn], dp[maxn];
int main()
{
ll n; scanf("%lld", &n);
ll x = (ll)sqrt(n);
ll y = x * x;
n -= y;
std::cout << 2 + x + n << "\n";
return 0;
}