結果

問題 No.98 円を描こう
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-01-02 15:28:09
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 1,046 bytes
コンパイル時間 5,175 ms
コンパイル使用メモリ 307,844 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-02 15:28:16
合計ジャッジ時間 6,590 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 3 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 3 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 3 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}
long long  power_mod(long long n, long long k, long long mod) {
    long  result = 1;
    // k を右シフトしつつ n を 2 乗していく
    while (k > 0) {
        // k の最下ビットが 1 なら、今の n を答えに掛ける
        if ((k & 1) == 1) result = (result * n) % mod;
        n = n * n % mod;
        k >>= 1;
    }
    return result;
}
template <class T>
map<T,ll> Counter(vector<T> A){
    map<T,ll> m;
    for(auto a:A) m[a]++;
    return m;
} 

int main(){
    ll x,y;
    cin >> x >> y;
    ll r;
    x = 2*x;
    y = 2*y;
    r = x*x + y*y;
    rep(i,1,1000000,1){
        if (i*i > r){
            cout << i << endl;
            return 0;
        }
    }
    return 0;
}
0