結果

問題 No.98 円を描こう
コンテスト
ユーザー Hydrogen332
提出日時 2024-09-27 18:29:15
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 389 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,021 ms
コンパイル使用メモリ 210,376 KB
実行使用メモリ 16,768 KB
最終ジャッジ日時 2026-07-05 20:10:20
合計ジャッジ時間 2,305 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)s; i < (int)e; i++)

int main() {
    cin.tie(nullptr);
    
    int x, y;
    cin >> x >> y;
    
    int d = x*x + y*y;
    
    int R = 1;
    while (true) {
        if (d * 4 < R * R) {
            cout << R << '\n';
            return 0;
        }
        
        R++;
    }
}
0