結果

問題 No.98 円を描こう
ユーザー re1ns
提出日時 2015-11-06 21:32:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 60,308 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 13:11:17
合計ジャッジ時間 1,095 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
    double x,y;
    double ans;
    cin >> x >> y;
    ans = sqrt(pow(x,2)+pow(y,2))*2;
    if(ceil(ans)==ans)cout << ++ans;
    else cout << ceil(ans);
}
0