結果

問題 No.508 超ゆとり教育
ユーザー uk714
提出日時 2020-09-12 01:25:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 563 bytes
コンパイル時間 1,514 ms
コンパイル使用メモリ 166,236 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 12:37:44
合計ジャッジ時間 2,318 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

// https://yukicoder.me/problems/no/508
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#define CEIL(a, b) ((a - 1) / b + 1)

void solve() {
    int N;
    cin >> N;
    // M_PI * R * R = N を解く
    int ans = sqrt(N / 3);
    cout << (ans == 0 ? 1 : ans) << endl;
}

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    solve();
}
0