結果

問題 No.98 円を描こう
ユーザー リチウム
提出日時 2014-12-10 00:42:13
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 54,108 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 19:07:50
合計ジャッジ時間 942 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;


int main()
{
	int x, y;
	cin >> x >> y;
	double r_2 = x*x + y*y;
	double ans = 1;
	while (true){
		if (ans*ans / 4 <= r_2)ans++;
		else {
			cout << ans  << endl;
			break;
		}
	}
	return 0;
}
0