結果

問題 No.98 円を描こう
ユーザー sayu
提出日時 2014-12-09 23:42:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 530 bytes
コンパイル時間 750 ms
コンパイル使用メモリ 82,844 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-11 19:03:45
合計ジャッジ時間 1,223 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
#define rep(i,x) for(int i=0;i<(int)(x);++i)

int main(){
	int xp, yp, ret;
	double s, t;
	cin >> xp >> yp;
	s = sqrt(xp*xp + yp*yp);
	t = ceil(s);
	ret = (int)t*2;
	cout << (t-s ? ret : ret+1) << endl;
	return 0;
}
0