結果

問題 No.98 円を描こう
ユーザー Rittai_3D
提出日時 2016-10-03 14:19:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 292 bytes
コンパイル時間 1,581 ms
コンパイル使用メモリ 166,024 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-21 15:12:42
合計ジャッジ時間 2,064 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using pint = pair< int, int >;

int main()
{
    pint pos {};
    cin >> pos.first >> pos.second;
    const double d = sqrt( pos.first * pos.first + pos.second * pos.second ) * 2;
    cout << ( d - floor( d ) > 0 ? ceil( d ) : d + 1 ) << endl;
}
0