結果

問題 No.1664 Unstable f(n)
ユーザー 杨娵隅
提出日時 2021-09-03 21:29:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 1,895 ms
コンパイル使用メモリ 165,060 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-15 10:08:49
合計ジャッジ時間 2,467 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0