結果

問題 No.98 円を描こう
ユーザー ohreitetsu
提出日時 2018-06-07 22:24:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 68,496 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-30 10:35:13
合計ジャッジ時間 1,103 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char* argv[])
{
	int X,Y;
	cin>>X>>Y;
	double R2=(double)(X*X+Y*Y);
	double R=sqrt(R2);
	int D;
	if (R==(int)R){
		D=2*(int)R+1;
	}else{
		D=2*(int)(R+0.9);
	}
	cout<<D<<endl;
	return 0;
}
0